From 7555de2275572b644a4204db72c305fa132df62c Mon Sep 17 00:00:00 2001 From: yuliang_guo Date: Tue, 3 Feb 2026 15:12:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E5=BA=93=E5=8A=A0=E8=BD=BD=20-=20=E5=90=8E=E7=AB=AF=E9=99=90?= =?UTF-8?q?=E5=88=B6=E6=AF=8F=E9=A1=B5=E6=9C=80=E5=A4=9A100=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- .../views/manager/growth-path-management.vue | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) 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 {