diff --git a/frontend/src/views/manager/growth-path-management.vue b/frontend/src/views/manager/growth-path-management.vue index 50855b7..531d4f2 100644 --- a/frontend/src/views/manager/growth-path-management.vue +++ b/frontend/src/views/manager/growth-path-management.vue @@ -662,8 +662,27 @@ const loadPositions = async () => { const loadCourses = async () => { coursesLoading.value = true try { - const res = await getManagerCourses({ page: 1, size: 500 }) - courses.value = res.data?.items || res.items || [] + // 后端限制每页最多100条,需要分页获取所有课程 + let allCourses: Course[] = [] + let page = 1 + const pageSize = 100 + let hasMore = true + + while (hasMore) { + const res = await getManagerCourses({ page, size: pageSize }) + const items = res.data?.items || res.items || [] + allCourses = [...allCourses, ...items] + + // 检查是否还有更多数据 + const total = res.data?.total || res.total || 0 + hasMore = allCourses.length < total && items.length === pageSize + page++ + + // 安全限制:最多获取10页(1000门课程) + if (page > 10) break + } + + courses.value = allCourses } catch (error) { console.error('加载课程失败:', error) } finally {