小程序code换取openId
This commit is contained in:
@@ -32,6 +32,17 @@ public class UserAuthorizationController {
|
||||
return CzgResult.success(userAuthorizationService.login(userAuthorizationLoginDTO));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过code获取openId
|
||||
* @param code code
|
||||
* @param source 平台 wechat微信 支付宝alipay
|
||||
* @return 返回openId
|
||||
*/
|
||||
@GetMapping("/openId")
|
||||
public CzgResult<String> getOpenId(@RequestParam String code, @RequestParam String source) {
|
||||
return CzgResult.success(userAuthorizationService.getOpenId(code, source));
|
||||
}
|
||||
|
||||
/**
|
||||
* 小程序登录
|
||||
* @return 登录信息
|
||||
|
||||
Reference in New Issue
Block a user