From ba94ceae1315174798ae1967ef62268c6d16cd5b Mon Sep 17 00:00:00 2001
From: Codex Assistant <codex@example.com>
Date: 星期一, 06 十月 2025 22:07:06 +0800
Subject: [PATCH] feat: 评审与活动相关改动 - backend(GraphQL): Activity schema 增加 updateActivityState(id, state);实现 resolver/service 仅更新 state=2 作为逻辑删除 - backend(GraphQL): region.graphqls 新增 Query leafRegions - backend(GraphQL): player.graphqls 的 projectReviewApplications 增加可选参数 regionId - backend(Service): listProjectReviewApplications 绑定 regionId 参数,修复 QueryParameterException - frontend(web): 新增 api/activity.js 的 updateActivityState 并接入 activity-list 删除逻辑 - frontend(web): review-list.vue 权限仅校验登录,移除角色限制;查询参数修正为 name/regionId - frontend(web): 删除未引用的 ActivityList.vue - frontend(web): projectReviewNew.js GraphQL 查询增加 name 参数

---
 web/src/api/promotion.js |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/web/src/api/promotion.js b/web/src/api/promotion.js
index 6094476..c2b315d 100644
--- a/web/src/api/promotion.js
+++ b/web/src/api/promotion.js
@@ -5,6 +5,7 @@
   query GetPromotionCompetitions($name: String, $page: Int, $size: Int) {
     promotionCompetitions(name: $name, page: $page, size: $size) {
       id
+      competitionId
       competitionName
       stageName
       maxParticipants
@@ -78,8 +79,8 @@
         page: params.page || 1,
         size: params.size || 10
       }
-      const data = await graphqlRequest(GET_PROMOTION_COMPETITIONS, variables)
-      return data.promotionCompetitions || []
+      const result = await graphqlRequest(GET_PROMOTION_COMPETITIONS, variables)
+      return result?.data?.promotionCompetitions || []
     } catch (error) {
       console.error('鑾峰彇姣旇禌鏅嬬骇鍒楄〃澶辫触:', error)
       throw error
@@ -94,8 +95,8 @@
         page: params.page || 1,
         size: params.size || 10
       }
-      const data = await graphqlRequest(GET_COMPETITION_PARTICIPANTS, variables)
-      return data.competitionParticipants || []
+      const result = await graphqlRequest(GET_COMPETITION_PARTICIPANTS, variables)
+      return result?.data?.competitionParticipants || []
     } catch (error) {
       console.error('鑾峰彇姣旇禌鍙傝禌浜哄憳澶辫触:', error)
       throw error
@@ -106,8 +107,8 @@
   async getPromotableParticipants(currentStageId) {
     try {
       const variables = { currentStageId }
-      const data = await graphqlRequest(GET_PROMOTABLE_PARTICIPANTS, variables)
-      return data.promotableParticipants
+      const result = await graphqlRequest(GET_PROMOTABLE_PARTICIPANTS, variables)
+      return result?.data?.promotableParticipants
     } catch (error) {
       console.error('鑾峰彇鍙檵绾у弬璧涜�呭垪琛ㄥけ璐�:', error)
       throw error
@@ -124,8 +125,8 @@
           targetStageId
         }
       }
-      const data = await graphqlRequest(PROMOTE_PARTICIPANTS, variables)
-      return data.promoteParticipants
+      const result = await graphqlRequest(PROMOTE_PARTICIPANTS, variables)
+      return result?.data?.promoteParticipants
     } catch (error) {
       console.error('鎵ц鏅嬬骇鎿嶄綔澶辫触:', error)
       throw error

--
Gitblit v1.8.0