This commit is contained in:
@@ -567,7 +567,9 @@ const loadCourses = async () => {
|
||||
coursesLoading.value = true
|
||||
try {
|
||||
const res = await getManagerCourses({ page: 1, size: 200 })
|
||||
courses.value = res.items || []
|
||||
// API返回格式: { code, message, data: { items, total, page, size } }
|
||||
courses.value = res.data?.items || res.items || []
|
||||
console.log('加载课程列表成功:', courses.value.length, '门课程')
|
||||
} catch (error) {
|
||||
console.error('加载课程列表失败:', error)
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user