Merge branch 'tkk' into test
This commit is contained in:
@@ -113,7 +113,8 @@ public class LoginContoller {
|
|||||||
JSONObject wxResp = WechatUtil.getSessionKeyOrOpenId(code, customAppId, customSecrete);
|
JSONObject wxResp = WechatUtil.getSessionKeyOrOpenId(code, customAppId, customSecrete);
|
||||||
Integer errCode = wxResp.getInteger("errcode");
|
Integer errCode = wxResp.getInteger("errcode");
|
||||||
log.info("微信获取openid响应报文:{}", wxResp.toJSONString());
|
log.info("微信获取openid响应报文:{}", wxResp.toJSONString());
|
||||||
if (errCode.intValue() != 0) {
|
boolean hasOpenId = wxResp.containsKey("openid");
|
||||||
|
if (!hasOpenId) {
|
||||||
return Result.fail("登录失败:" + wxResp.getString("errmsg"));
|
return Result.fail("登录失败:" + wxResp.getString("errmsg"));
|
||||||
}
|
}
|
||||||
// 3.接收微信接口服务 获取返回的参数
|
// 3.接收微信接口服务 获取返回的参数
|
||||||
|
|||||||
Reference in New Issue
Block a user