```
Some checks failed
lotteryfront CI / build (push) Has been cancelled

feat(player-auth): 登录接口增加站点代码参数

登录请求中添加 site_code 参数,该参数从环境变量
NEXT_PUBLIC_PLAYER_SITE_CODE 中获取,并通过
spread 操作符合并到请求体中
```
This commit is contained in:
2026-06-18 14:45:28 +08:00
parent 2f1793e0cf
commit 34b851d7e1

View File

@@ -34,5 +34,9 @@ export function getPlayerAuthCaptcha(): Promise<PlayerAuthCaptchaResponse> {
/** `POST /api/v1/player/auth/login`(公开) */ /** `POST /api/v1/player/auth/login`(公开) */
export function postPlayerAuthLogin(body: PlayerAuthLoginPayload): Promise<PlayerAuthLoginData> { export function postPlayerAuthLogin(body: PlayerAuthLoginPayload): Promise<PlayerAuthLoginData> {
return lotteryRequest.post<PlayerAuthLoginData>(`/player/auth/login`, body); const siteCode = process.env.NEXT_PUBLIC_PLAYER_SITE_CODE?.trim();
return lotteryRequest.post<PlayerAuthLoginData>(`/player/auth/login`, {
...(siteCode ? { site_code: siteCode } : {}),
...body,
});
} }