From c4a9cad1c50e89365e2a58b50e259af642ed3b8c Mon Sep 17 00:00:00 2001
From: Codex Assistant <codex@example.com>
Date: 星期二, 07 十月 2025 16:12:20 +0800
Subject: [PATCH] feat(review): 调整评审详情展示顺序与样式,描述支持多行,项目信息列宽40/60 fix(auth): 登录页与首页循环跳转保护;api.ts 在登录页不再重定向;401分支在登录页不跳转 fix(router): /login 放行策略优化,避免死循环;评审列表跳转到 /project-review/:id/detail fix(frontend): 补齐 utils/appConfig.ts,避免启动白屏 fix(review): 详情页提交评分缺少stageId时回退使用项目详情的stageId feat(backend): ActivityPlayerDetailResponse.playerInfo 补充 avatarUrl/avatar,服务组装时填充用户头像 chore(dev): 启动脚本注入本地JWT密钥,重启前后端

---
 web/src/api/region.js |   49 +++++++++++++++++++++++++++++++++++--------------
 1 files changed, 35 insertions(+), 14 deletions(-)

diff --git a/web/src/api/region.js b/web/src/api/region.js
index d78274b..6a134e2 100644
--- a/web/src/api/region.js
+++ b/web/src/api/region.js
@@ -1,6 +1,6 @@
 import { API_CONFIG, graphqlRequest } from '@/config/api'
 
-// GraphQL璇锋眰鍑芥暟 - 浣跨敤缁熶竴鐨刧raphqlRequest
+// GraphQL 璇锋眰鍑芥暟 - 缁熶竴浣跨敤 graphqlRequest
 
 // 鑾峰彇鎵�鏈夊湴鍖�
 export const getRegions = async () => {
@@ -15,7 +15,7 @@
       }
     }
   `
-  
+
   try {
     const result = await graphqlRequest(query)
     return result.data.regions || []
@@ -24,7 +24,7 @@
   }
 }
 
-// 鏍规嵁ID鑾峰彇鍦板尯
+// 鏍规嵁 ID 鑾峰彇鍦板尯璇︽儏
 export const getRegion = async (id) => {
   const query = `
     query GetRegion($id: ID!) {
@@ -37,7 +37,7 @@
       }
     }
   `
-  
+
   try {
     const result = await graphqlRequest(query, { id })
     return result.data.region
@@ -59,7 +59,7 @@
       }
     }
   `
-  
+
   try {
     const data = await graphqlRequest(mutation, { input: regionData })
     return data.saveRegion
@@ -75,7 +75,7 @@
       deleteRegion(id: $id)
     }
   `
-  
+
   try {
     const data = await graphqlRequest(mutation, { id })
     return data.deleteRegion
@@ -96,7 +96,7 @@
       }
     }
   `
-  
+
   try {
     const result = await graphqlRequest(query)
     return result.data.provinces || []
@@ -105,7 +105,7 @@
   }
 }
 
-// 鏍规嵁鐪佷唤ID鑾峰彇鍩庡競
+// 鏍规嵁鐪佷唤 ID 鑾峰彇鍩庡競
 export const getCities = async (provinceId) => {
   const query = `
     query GetCities($provinceId: ID!) {
@@ -117,7 +117,7 @@
       }
     }
   `
-  
+
   try {
     const result = await graphqlRequest(query, { provinceId })
     return result.data.cities || []
@@ -126,7 +126,7 @@
   }
 }
 
-// 鏍规嵁鍩庡競ID鑾峰彇鍖哄幙
+// 鏍规嵁鍩庡競 ID 鑾峰彇鍖哄幙
 export const getDistricts = async (cityId) => {
   const query = `
     query GetDistricts($cityId: ID!) {
@@ -138,7 +138,7 @@
       }
     }
   `
-  
+
   try {
     const result = await graphqlRequest(query, { cityId })
     return result.data.districts || []
@@ -147,7 +147,27 @@
   }
 }
 
-// RegionApi 瀵硅薄锛屽寘鍚墍鏈夊尯鍩熺浉鍏崇殑API鏂规硶
+// 鑾峰彇鍙跺瓙鍦板尯鍒楄〃
+export const getLeafRegions = async () => {
+  const query = `
+    query LeafRegions {
+      leafRegions {
+        id
+        name
+        leafFlag
+      }
+    }
+  `
+
+  try {
+    const result = await graphqlRequest(query)
+    return result.data.leafRegions || []
+  } catch (error) {
+    throw new Error(error.message || '鑾峰彇鍙跺瓙鍦板尯鍒楄〃澶辫触')
+  }
+}
+
+// RegionApi 瀵硅薄锛屽寘鍚墍鏈夊尯鍩熺浉鍏崇殑 API 鏂规硶
 export const RegionApi = {
   getRegions,
   getRegion,
@@ -155,5 +175,6 @@
   deleteRegion,
   getProvinces,
   getCities,
-  getDistricts
-}
\ No newline at end of file
+  getDistricts,
+  getLeafRegions
+}

--
Gitblit v1.8.0