From 34b851d7e10c437c325d349f1b10380100378a4e Mon Sep 17 00:00:00 2001 From: kang Date: Thu, 18 Jun 2026 14:45:28 +0800 Subject: [PATCH] =?UTF-8?q?```=20feat(player-auth):=20=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=A2=9E=E5=8A=A0=E7=AB=99=E7=82=B9=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 登录请求中添加 site_code 参数,该参数从环境变量 NEXT_PUBLIC_PLAYER_SITE_CODE 中获取,并通过 spread 操作符合并到请求体中 ``` --- src/api/player-auth.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/api/player-auth.ts b/src/api/player-auth.ts index f1a883f..bf5d953 100644 --- a/src/api/player-auth.ts +++ b/src/api/player-auth.ts @@ -34,5 +34,9 @@ export function getPlayerAuthCaptcha(): Promise { /** `POST /api/v1/player/auth/login`(公开) */ export function postPlayerAuthLogin(body: PlayerAuthLoginPayload): Promise { - return lotteryRequest.post(`/player/auth/login`, body); + const siteCode = process.env.NEXT_PUBLIC_PLAYER_SITE_CODE?.trim(); + return lotteryRequest.post(`/player/auth/login`, { + ...(siteCode ? { site_code: siteCode } : {}), + ...body, + }); }