|
|
@@ -1,4 +1,4 @@
|
|
|
-import { Controller, Get, Query } from '@nestjs/common'
|
|
|
+import { Body, Controller, Get, Post, Query } from '@nestjs/common'
|
|
|
import { WeixinService } from './weixin.service'
|
|
|
import { Public } from 'src/auth/public.decorator'
|
|
|
import { ApiQuery, ApiTags } from '@nestjs/swagger'
|
|
|
@@ -14,10 +14,10 @@ export class WeixinController {
|
|
|
}
|
|
|
|
|
|
@Public()
|
|
|
- @Get('/redirectUrl')
|
|
|
+ @Post('/redirectUrl')
|
|
|
@ApiQuery({ name: 'url' })
|
|
|
- public getRedirectUrl(@Query() { url, state }) {
|
|
|
- return this.weixinService.getRedirectUrl(url, state)
|
|
|
+ public getRedirectUrl(@Body() { url, state }) {
|
|
|
+ return { url: this.weixinService.getRedirectUrl(url, state) }
|
|
|
}
|
|
|
|
|
|
@Public()
|
|
|
@@ -33,8 +33,8 @@ export class WeixinController {
|
|
|
}
|
|
|
|
|
|
@Public()
|
|
|
- @Get('/jsapiSign')
|
|
|
- public async jsapiSign(@Query() { url }) {
|
|
|
+ @Post('/jsapiSign')
|
|
|
+ public async jsapiSign(@Body() { url }) {
|
|
|
return await this.weixinService.jsapiSign(url)
|
|
|
}
|
|
|
}
|