diff --git a/src/api/exam/exam.js b/src/api/exam/exam.js index 3f610b1..5424ca6 100644 --- a/src/api/exam/exam.js +++ b/src/api/exam/exam.js @@ -5,7 +5,7 @@ import { post } from '@/utils/request' * @param data */ export function fetchDetail(id) { - return post('/exam/api/exam/exam/detail', { id: id }) + return post('/api/common/exam/api/exam/exam/detail', { id: id }) } /** diff --git a/src/components/AppHeader.vue b/src/components/AppHeader.vue index 7c5c12b..e1fe077 100644 --- a/src/components/AppHeader.vue +++ b/src/components/AppHeader.vue @@ -7,7 +7,7 @@ <span>云帆教育</span> </router-link> </div> - + <nav class="main-nav"> <router-link to="/">首页</router-link> <router-link to="/course">课程中心</router-link> @@ -17,7 +17,7 @@ <router-link to="/mall">积分商城</router-link> <router-link to="/announcement">公告</router-link> </nav> - + <div class="user-actions"> <template v-if="userStore.isLoggedIn"> <!-- 管理员入口 --> @@ -25,7 +25,7 @@ <el-icon><Setting /></el-icon> <span>管理后台</span> </router-link> - + <el-dropdown trigger="click" @command="handleCommand"> <div class="user-info"> <el-avatar :size="32" :src="userStore.userInfo.avatar" /> @@ -41,10 +41,10 @@ </template> </el-dropdown> </template> - + <template v-else> <router-link to="/login" class="login-btn">登录</router-link> - <router-link to="/register" class="register-btn">注册</router-link> +<!-- <router-link to="/register" class="register-btn">注册</router-link>--> </template> </div> </div> @@ -80,7 +80,7 @@ const handleCommand = (command) => { left: 0; right: 0; z-index: 100; - + .header-container { max-width: 1200px; margin: 0 auto; @@ -89,40 +89,40 @@ const handleCommand = (command) => { align-items: center; justify-content: space-between; padding: 0 20px; - + .logo { a { display: flex; align-items: center; text-decoration: none; color: #333; - + img { height: 36px; margin-right: 10px; } - + span { font-size: 18px; font-weight: bold; } } } - + .main-nav { display: flex; gap: 20px; - + a { text-decoration: none; color: #333; font-size: 15px; padding: 5px 0; position: relative; - + &.router-link-active { color: #409EFF; - + &::after { content: ''; position: absolute; @@ -133,18 +133,18 @@ const handleCommand = (command) => { background-color: #409EFF; } } - + &:hover { color: #409EFF; } } } - + .user-actions { display: flex; align-items: center; gap: 15px; - + .admin-link { display: flex; align-items: center; @@ -154,41 +154,41 @@ const handleCommand = (command) => { padding: 5px 10px; border-radius: 4px; transition: background-color 0.3s; - + &:hover { background-color: #ecf5ff; } } - + .user-info { display: flex; align-items: center; cursor: pointer; - + span { margin: 0 5px; } } - + .login-btn, .register-btn { text-decoration: none; padding: 6px 15px; border-radius: 4px; } - + .login-btn { color: #409EFF; border: 1px solid #409EFF; - + &:hover { background-color: #ecf5ff; } } - + .register-btn { background-color: #409EFF; color: white; - + &:hover { background-color: #66b1ff; } @@ -196,4 +196,4 @@ const handleCommand = (command) => { } } } -</style> \ No newline at end of file +</style> diff --git a/src/views/paper/exam/list.vue b/src/views/paper/exam/list.vue index 221cc65..280fb73 100644 --- a/src/views/paper/exam/list.vue +++ b/src/views/paper/exam/list.vue @@ -139,7 +139,7 @@ export default { // 可批量操作 multi: false, // 列表请求URL - listUrl: '/exam/api/exam/exam/online-paging' + listUrl: '/api/common/exam/api/exam/exam/online-paging' } } },