微信小程序审核不通过修改
CI / verify (pull_request) Has been cancelled

This commit is contained in:
2026-07-21 09:32:06 +08:00
parent 350a086a73
commit 935ab0d1d4
14 changed files with 466 additions and 242 deletions
@@ -10,6 +10,7 @@ import {
CheckPartnerPhoneDto,
LoginSmsDto,
LoginWechatDto,
LoginWechatPhoneDto,
RefreshTokenDto,
SendSmsDto,
} from './dto/auth.dto';
@@ -74,6 +75,23 @@ export class UserAuthController {
return this.authService.loginUserWechat(dto.code, clientApp, platform, guestId);
}
/** 小程序手机号快捷登录(getPhoneNumber */
@Post('auth/login/wechat-phone')
@UseGuards(OptionalJwtAuthGuard)
wechatPhoneLogin(@Req() req: Request, @Body() dto: LoginWechatPhoneDto) {
const guest = (req as Request & { user?: AuthUser }).user;
const guestId = guest?.actorType === 'USER' ? guest.actorId : undefined;
const clientApp = resolveUserClientApp(req);
const platform = dto.platform ?? (clientApp === ClientApp.USER_MINI ? 'mini' : 'h5');
return this.authService.loginUserWechatPhone(
dto.phoneCode,
clientApp,
platform,
guestId,
dto.loginCode,
);
}
@Post('auth/wechat/bind-phone')
bindPhoneLegacy(@Req() req: Request, @Body() dto: BindWechatPhoneDto) {
return this.authService.bindWechatPhone(