feat(player-auth): 登录接口增加站点代码参数 登录请求中添加 site_code 参数,该参数从环境变量 NEXT_PUBLIC_PLAYER_SITE_CODE 中获取,并通过 spread 操作符合并到请求体中 ```
This commit is contained in:
@@ -34,5 +34,9 @@ export function getPlayerAuthCaptcha(): Promise<PlayerAuthCaptchaResponse> {
|
||||
|
||||
/** `POST /api/v1/player/auth/login`(公开) */
|
||||
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,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user