diff --git a/src/api/modules/teachCourse.ts b/src/api/modules/teachCourse.ts index cbe3d66..5788fe3 100644 --- a/src/api/modules/teachCourse.ts +++ b/src/api/modules/teachCourse.ts @@ -193,9 +193,7 @@ export class TeachCourseApi { try { console.log('🚀 发送删除课程请求:', { url: '/aiol/aiolCourse/delete', id }) - const response = await ApiRequest.delete('/aiol/aiolCourse/delete', { - params: { id } - }) + const response = await ApiRequest.delete(`/aiol/aiolCourse/delete?id=${id}`, ) console.log('🗑️ 删除课程响应:', response) return response diff --git a/src/components/admin/CourseComponents/CourseCategory.vue b/src/components/admin/CourseComponents/CourseCategory.vue index e5d0ddc..eb57239 100644 --- a/src/components/admin/CourseComponents/CourseCategory.vue +++ b/src/components/admin/CourseComponents/CourseCategory.vue @@ -2,7 +2,7 @@
- + @@ -24,14 +24,10 @@
- +
- +
- +
- +
- +
{{ course.statusText }}
- +
@@ -117,8 +105,17 @@ @@ -804,28 +862,28 @@ onMounted(() => { .header-left { - display: flex; - align-items: center; - gap: 16px; + display: flex; + align-items: center; + gap: 16px; } .page-title { - margin: 0; - font-size: 18px; - font-weight: 600; - color: #333; + margin: 0; + font-size: 18px; + font-weight: 600; + color: #333; } .title { - margin: 0; - font-size: 20px; - font-weight: 500; - color: #333; + margin: 0; + font-size: 20px; + font-weight: 500; + color: #333; } .header-actions { - display: flex; - gap: 12px; + display: flex; + gap: 12px; } .form-row { diff --git a/src/views/teacher/AdminDashboard.vue b/src/views/teacher/AdminDashboard.vue index 20308fd..41876d9 100644 --- a/src/views/teacher/AdminDashboard.vue +++ b/src/views/teacher/AdminDashboard.vue @@ -151,6 +151,14 @@ const activeSubNavItem = ref(''); // 子菜单激活状态 const examMenuExpanded = ref(false); // 考试管理菜单展开状态 const studentMenuExpanded = ref(false); // 学员中心菜单展开状态 const showTopImage = ref(true); // 控制顶部图片显示/隐藏 + +// 需要隐藏顶部图片的路由路径数组 +const hideTopImageRoutes = [ + 'teacher/chapter-editor-teacher', + 'teacher/course-editor' + // 可以在这里添加更多需要隐藏顶部图片的路由 +]; + const route = useRoute(); const router = useRouter(); const isAiHovered = ref(false); @@ -654,13 +662,29 @@ onMounted(() => { } else { document.documentElement.style.setProperty('--top-height', '0px'); } + updateTopImageVisibility(); }); // 使用watch监听路由变化 watch(route, () => { updateActiveNavItem(); + updateTopImageVisibility(); }); +// 更新顶部图片显示状态 +const updateTopImageVisibility = () => { + const currentPath = route.path; + console.log('检查路径是否需要隐藏顶部图片:', currentPath); + + // 检查当前路径是否包含需要隐藏顶部图片的路由 + const shouldHideTopImage = hideTopImageRoutes.some(routePath => + currentPath.includes(routePath) + ); + + showTopImage.value = !shouldHideTopImage; + console.log('顶部图片显示状态:', showTopImage.value); +}; + // 更新激活的导航项 const updateActiveNavItem = () => { const path = route.path; @@ -704,7 +728,7 @@ const updateActiveNavItem = () => {