From 6befd3644a397bc35c098e33e7fdf6b46173fca0 Mon Sep 17 00:00:00 2001 From: DevOps Date: Sun, 28 Dec 2025 17:09:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E9=A1=B5=E9=9D=A2=E6=95=B0=E6=8D=AE=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修复 API 响应数据解析 (res.data.data.records) - 移除后端不支持的 eventType 参数 - 修复报名费字段映射 (registrationFee -> price) - 修复分组类别显示为文本而非数字 Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> --- src/views/martial/project/index.vue | 37 +++++++++++++---------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/src/views/martial/project/index.vue b/src/views/martial/project/index.vue index 75a86aa..16cbf55 100644 --- a/src/views/martial/project/index.vue +++ b/src/views/martial/project/index.vue @@ -141,20 +141,10 @@ /> - - - + @@ -607,8 +597,8 @@ const rules = { const loadCompetitionList = async () => { try { const res = await getCompetitionList(1, 1000, { status: 1 }) - if (res.data && res.data.records) { - competitionList.value = res.data.records + if (res.data && res.data.data && res.data.data.records) { + competitionList.value = res.data.data.records } } catch (error) { console.error('加载赛事列表失败:', error) @@ -619,14 +609,21 @@ const loadCompetitionList = async () => { const fetchData = async () => { loading.value = true try { + // Only pass parameters that backend supports + const params = { + competitionId: queryParams.competitionId || undefined, + projectName: queryParams.projectName || undefined, + category: queryParams.category || undefined, + type: queryParams.type || undefined + } const res = await getProjectList( queryParams.current, queryParams.size, - queryParams + params ) - if (res.data) { - tableData.value = res.data.records || [] - total.value = res.data.total || 0 + if (res.data && res.data.data) { + tableData.value = res.data.data.records || [] + total.value = res.data.data.total || 0 } } catch (error) { ElMessage.error('获取数据失败')