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('获取数据失败')