丸子 9 месяцев назад
Родитель
Сommit
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