hookehuyr

refactor(课程页面): 更新课程卡片键值并修正课程类型映射

将课程卡片的键值从 `id` 更改为 `good_id`,以匹配后端数据结构。同时将课程类型映射中的 `录播课` 改为 `音频`,使其更符合实际用途。
1 <!-- 1 <!--
2 * @Date: 2025-03-21 12:17:03 2 * @Date: 2025-03-21 12:17:03
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2025-04-18 10:05:47 4 + * @LastEditTime: 2025-04-18 17:30:15
5 * @FilePath: /mlaj/src/views/courses/MyCoursesPage.vue 5 * @FilePath: /mlaj/src/views/courses/MyCoursesPage.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
15 @load="onLoad" 15 @load="onLoad"
16 class="px-4 py-3 space-y-4" 16 class="px-4 py-3 space-y-4"
17 > 17 >
18 - <CourseCard v-for="course in courses" :key="course.id" :course="course" :linkTo="`/studyCourse/${course.id}`" /> 18 + <CourseCard v-for="course in courses" :key="course.good_id" :course="course" :linkTo="`/studyCourse/${course.good_id}`" />
19 </van-list> 19 </van-list>
20 20
21 <!-- 无数据提示 --> 21 <!-- 无数据提示 -->
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
32 import { ref } from 'vue'; 32 import { ref } from 'vue';
33 import { useRoute, useRouter } from 'vue-router'; 33 import { useRoute, useRouter } from 'vue-router';
34 import CourseCard from '@/components/ui/CourseCard.vue'; 34 import CourseCard from '@/components/ui/CourseCard.vue';
35 -import { courses as mockCourses } from '@/utils/mockData';
36 import { useTitle } from '@vueuse/core'; 35 import { useTitle } from '@vueuse/core';
37 36
38 // 导入接口 37 // 导入接口
......
...@@ -129,7 +129,7 @@ const course = ref([]); ...@@ -129,7 +129,7 @@ const course = ref([]);
129 const course_lessons = ref([]); 129 const course_lessons = ref([]);
130 const course_type_maps = ref({ 130 const course_type_maps = ref({
131 video: '视频', 131 video: '视频',
132 - audio: '录播课', 132 + audio: '音频',
133 image: '图片', 133 image: '图片',
134 file: '文件', 134 file: '文件',
135 }) 135 })
......