门店页面修改

This commit is contained in:
2026-07-07 00:18:29 +08:00
parent 1fcafac2a7
commit 5d19089f91
11 changed files with 432 additions and 39 deletions
@@ -112,7 +112,17 @@ export class ShopAuthController {
}
@Post('login/wechat')
wechatLogin(@Body() dto: LoginWechatDto) {
@UseGuards(OptionalJwtAuthGuard)
wechatLogin(@Req() req: Request, @Body() dto: LoginWechatDto) {
const user = (req as Request & { user?: AuthUser }).user;
if (user?.actorType === 'STORE') {
return this.authService.bindStoreWechat(
user.actorId,
dto.code,
ClientApp.SHOP_H5,
dto.platform ?? 'h5',
);
}
return this.authService.loginStoreWechat(dto.code, ClientApp.SHOP_H5, dto.platform ?? 'h5');
}