From 58d9f460b2f8c34430285115e2557d18333c5cab Mon Sep 17 00:00:00 2001
From: Codex Assistant <codex@example.com>
Date: 星期三, 08 十月 2025 14:16:55 +0800
Subject: [PATCH] feat: 修复Player实体phone字段数据冗余问题并优化小程序报名逻辑

---
 wx/pages/judge/review.js |   49 +++++++++++++++++++++++++------------------------
 1 files changed, 25 insertions(+), 24 deletions(-)

diff --git a/wx/pages/judge/review.js b/wx/pages/judge/review.js
index 27afd37..c8d16d2 100644
--- a/wx/pages/judge/review.js
+++ b/wx/pages/judge/review.js
@@ -117,10 +117,8 @@
               items {
                 id
                 name
-                description
                 maxScore
-                weight
-                sortOrder
+                orderNo
               }
             }
           }
@@ -154,8 +152,10 @@
           participant: {
             id: detail.playerInfo.id,
             name: detail.playerInfo.name,
-            school: detail.regionInfo ? detail.regionInfo.name : '',
-            major: detail.playerInfo.education || '',
+            gender: this.getGenderText(detail.playerInfo.gender),
+            birthday: detail.playerInfo.birthday || '',
+            region: detail.regionInfo ? detail.regionInfo.name : '',
+            education: detail.playerInfo.education || '',
             avatar: detail.playerInfo.userInfo?.avatarUrl || '/images/default-avatar.svg'
           },
           status: detail.state === 1 ? 'APPROVED' : detail.state === 2 ? 'REJECTED' : 'PENDING'
@@ -215,14 +215,14 @@
           currentJudgeRating(activityPlayerId: $activityPlayerId) {
             id
             totalScore
-            comment
+            remark
             status
             ratedAt
             items {
               ratingItemId
               ratingItemName
               score
-              maxScore
+              weightedScore
             }
           }
         }
@@ -247,7 +247,7 @@
         this.setData({
           scores,
           totalScore,
-          comment: rating.comment || '',
+          comment: rating.remark || '',
           existingReview: rating,
           reviewStatus: rating.status || 'COMPLETED'
         })
@@ -280,7 +280,7 @@
     
     criteria.forEach(criterion => {
       const score = scores[criterion.id] || 0
-      totalScore += score * (criterion.weight || 1)
+      totalScore += score
     })
     
     this.setData({ totalScore })
@@ -422,15 +422,7 @@
       })
       return false
     }
-    
-    if (comment.trim().length < 10) {
-      wx.showToast({
-        title: '璇勫鎰忚鑷冲皯10涓瓧绗�',
-        icon: 'error'
-      })
-      return false
-    }
-    
+  
     return true
   },
 
@@ -443,8 +435,8 @@
       
       // 鏋勫缓璇勫垎椤规暟缁�
       const ratings = criteria.map(criterion => ({
-        itemId: criterion.id,
-        score: scores[criterion.id] || 0
+        itemId: parseInt(criterion.id),
+        score: parseFloat(scores[criterion.id] || 0)
       }))
       
       const mutation = `
@@ -454,8 +446,8 @@
       `
       
       const input = {
-        activityPlayerId,
-        stageId: activity.stageId,
+        activityPlayerId: parseInt(activityPlayerId),
+        stageId: parseInt(activity.id),
         ratings,
         comment: comment.trim()
       }
@@ -521,7 +513,7 @@
       
       const input = {
         activityPlayerId,
-        stageId: activity.stageId,
+        stageId: activity.id,
         ratings,
         comment: comment.trim()
       }
@@ -559,12 +551,14 @@
     }
   },
 
-  // 鏌ョ湅鍏朵粬璇勫
+  // 鏌ョ湅鍏朵粬璇勫 - 宸查殣钘忓姛鑳�
+  /*
   onViewOtherReviews() {
     wx.navigateTo({
       url: `/pages/judge/reviews?activityPlayerId=${this.data.activityPlayerId}`
     })
   },
+  */
 
   // 鑱旂郴鍙傝禌鑰�
   onContactParticipant() {
@@ -610,6 +604,13 @@
     }
   },
 
+  // 鎬у埆杞崲鍑芥暟
+  getGenderText(gender) {
+    if (gender === 0) return '鐢�'
+    if (gender === 1) return '濂�'
+    return '鏈~鍐�'
+  },
+
   // 鏍煎紡鍖栨棩鏈�
   formatDate(dateString) {
     return formatDate(dateString, 'YYYY-MM-DD HH:mm')

--
Gitblit v1.8.0