From 5ef09924481b1e67e1a35b07a057c8c14a02e88f Mon Sep 17 00:00:00 2001 From: hailin Date: Thu, 29 Jan 2026 12:29:39 -0800 Subject: [PATCH] =?UTF-8?q?fix(mobile-upgrade):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E8=82=A1=E8=A1=8CApp=E7=89=88=E6=9C=AC=E7=AE=A1=E7=90=86API?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E5=8C=B9=E9=85=8DKong=E8=B7=AF=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit NEXT_PUBLIC_MINING_API_URL 从 /mining-admin 改为 /api/v2/mining-admin, apiPrefix 从 /api/v2/versions 改为 /versions,使最终URL匹配Kong路由 /api/v2/mining-admin/* Co-Authored-By: Claude Opus 4.5 --- frontend/mobile-upgrade/.env.production | 2 +- .../mobile-upgrade/src/infrastructure/http/api-client.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/mobile-upgrade/.env.production b/frontend/mobile-upgrade/.env.production index 94532ceb..fdf7f525 100644 --- a/frontend/mobile-upgrade/.env.production +++ b/frontend/mobile-upgrade/.env.production @@ -1,6 +1,6 @@ # API Configuration NEXT_PUBLIC_API_URL=https://rwaapi.szaiai.com -NEXT_PUBLIC_MINING_API_URL=https://rwaapi.szaiai.com/mining-admin +NEXT_PUBLIC_MINING_API_URL=https://rwaapi.szaiai.com/api/v2/mining-admin # Application Info NEXT_PUBLIC_APP_NAME=RWADurian Mobile Upgrade diff --git a/frontend/mobile-upgrade/src/infrastructure/http/api-client.ts b/frontend/mobile-upgrade/src/infrastructure/http/api-client.ts index fb542302..132fac24 100644 --- a/frontend/mobile-upgrade/src/infrastructure/http/api-client.ts +++ b/frontend/mobile-upgrade/src/infrastructure/http/api-client.ts @@ -61,9 +61,10 @@ const APP_CONFIGS: Record = { apiPrefix: '/api/v1/versions', }, // 股行 App - 连接新的 mining-admin-service 后端 + // 生产环境通过 Kong 路由: /api/v2/mining-admin -> mining-admin-service:3023/api/v2 mining: { - baseURL: process.env.NEXT_PUBLIC_MINING_API_URL || 'http://localhost:3023', - apiPrefix: '/api/v2/versions', + baseURL: process.env.NEXT_PUBLIC_MINING_API_URL || 'http://localhost:3023/api/v2', + apiPrefix: '/versions', }, }