瀏覽代碼

智能课侧边栏跳转bug

丸子 9 月之前
父節點
當前提交
90c8e61739
共有 2 個文件被更改,包括 5 次插入4 次删除
  1. 0 1
      src/views/AIDevelop.vue
  2. 5 3
      src/views/AIGeneralCourse.vue

+ 0 - 1
src/views/AIDevelop.vue

@@ -434,7 +434,6 @@ const handleClose = () => {}
 const handleSelect = index => {
   //测试账号禁用视频
   if (disableVideo(index)) return
-
   const findTitle = items => {
     for (const item of items) {
       if (item.key === index) {

+ 5 - 3
src/views/AIGeneralCourse.vue

@@ -40,9 +40,9 @@
                     v-for="(title, index) in courseTitles"
                     :key="index + 1"
                     :index="(index + 1).toString()"
-                    @click="goToAIExperience(index + 1)"
+                    @click="goToAIExperience(classOutlineData[index])"
                   >
-                    0{{ index + 1 }} {{ title }}
+                   {{ title }}
                   </el-menu-item>
                 </el-menu>
               </el-col>
@@ -228,7 +228,9 @@ const getCourseTitle = index => {
 
 // 课程标题数组,依赖修改后的 getCourseTitle 函数 修改课程标题数组为 computed 属性
 const courseTitles = computed(() => {
-  return Array.from({ length: 8 }, (_, i) => getCourseTitle(i + 1))
+  return classOutlineData.value.map((item, index) => {
+    return `0${index + 1} ${item.ctType}`;
+  });
 })
 
 // 首页点击渲染后的页面title