微信小程序登陆
This commit is contained in:
parent
39b7a362c2
commit
7020853604
|
|
@ -32,7 +32,7 @@ public class WxServiceImpl implements WxService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getOpenidByCode(String code) {
|
public String getOpenidByCode(String code) {
|
||||||
String url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid="+ wxConfig.getAppId() + "&secret=" + wxConfig.getSecret() + "&code=" + code + "&grant_type=authorization_code";
|
String url = "https://api.weixin.qq.com/sns/jscode2session?appid="+ wxConfig.getAppId() + "&secret=" + wxConfig.getSecret() + "&js_code=" + code + "&grant_type=authorization_code";
|
||||||
log.info("调用微信获取openId,入参url:{}", url);
|
log.info("调用微信获取openId,入参url:{}", url);
|
||||||
String result = HttpUtils.sendGet(url);
|
String result = HttpUtils.sendGet(url);
|
||||||
log.info("调用微信获取openId,响应内容:{}", result);
|
log.info("调用微信获取openId,响应内容:{}", result);
|
||||||
|
|
|
||||||
|
|
@ -161,8 +161,8 @@ swagger:
|
||||||
|
|
||||||
#小程序配置
|
#小程序配置
|
||||||
wx:
|
wx:
|
||||||
appId: 'wx60fa92c432e05ed1'
|
appId: 'wx0e233b84fa447fb4'
|
||||||
secret: '8ff8ab065446e2ad552e88a37780d8fe'
|
secret: '9d8a99595d25cfc852f3644dafd06e98'
|
||||||
|
|
||||||
#阿里云OSS配置
|
#阿里云OSS配置
|
||||||
aliyun:
|
aliyun:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue