| | |
| | | } |
| | | |
| | | @CoolTag(TagTypes.IGNORE_TOKEN) |
| | | @Post('/miniPhone', { summary: '绑定小程序手机号' }) |
| | | @Post('/miniPhone', { summary: '小程序手机号授权登录' }) |
| | | async miniPhone(@Body() body) { |
| | | const { code, encryptedData, iv } = body; |
| | | const { code, encryptedData, iv, loginCode } = body; |
| | | return this.ok( |
| | | await this.userLoginService.miniPhone(code, encryptedData, iv) |
| | | await this.userLoginService.miniPhone(code, encryptedData, iv, loginCode) |
| | | ); |
| | | } |
| | | |
| | | @CoolTag(TagTypes.IGNORE_TOKEN) |
| | | @Post('/miniAuto', { summary: '小程序静默登录' }) |
| | | async miniAuto(@Body('code') code: string) { |
| | | return this.ok(await this.userLoginService.miniAuto(code)); |
| | | } |
| | | |
| | | @CoolTag(TagTypes.IGNORE_TOKEN) |
| | | @Get('/captcha', { summary: '图片验证码' }) |
| | | async captcha( |
| | | @Query('width') width: number, |