提交 83a43a7d 作者: zhenjie

登录修改

上级 737705c0
......@@ -44,13 +44,13 @@ public class AuthServiceImpl implements AuthService {
if (wxLoginVO.getFromPort().toString().equals(WxConstant.APP.toString())) {
//调用小程序登录接口,里面包含unionId
String appWxJson = wxService.appLogin(wxLoginVO);
log.error("wx appLogin msg==>" + appWxJson);
log.info("wx appLogin msg==>" + JSONObject.toJSONString(appWxJson));
if (appWxJson == null) {
return ResultBody.error(ResultEnum.APPLET_PORT_TYPE_ERROR);
}
JSONObject json = JSON.parseObject(appWxJson);
if (!json.containsKey(WxConstant.OPEN_ID) || !json.containsKey(WxConstant.SESSION_KEY)) {
log.error("wx appLogin error==>" + json);
log.error("wx appLogin error==>" + JSONObject.toJSONString(json));
return ResultBody.error(ResultEnum.APPLET_LOGIN_ERROR, json);
}
unionId = json.getString(WxConstant.UNION_ID);
......@@ -59,13 +59,13 @@ public class AuthServiceImpl implements AuthService {
}else if (wxLoginVO.getFromPort().equals(WxConstant.WEB)){
//获取access_token接口,里面包含unionId
String pcWxJson = wxService.pcLogin(wxLoginVO);
log.error("wx pcLogin msg==>" + pcWxJson);
log.info("wx pcLogin msg==>" + JSONObject.toJSONString(pcWxJson));
if (pcWxJson == null) {
return ResultBody.error(ResultEnum.APPLET_PORT_TYPE_ERROR);
}
JSONObject json = JSON.parseObject(pcWxJson);
if (!json.containsKey(WxConstant.OPEN_ID) ||!json.containsKey(WxConstant.SESSION_KEY)) {
log.error("wx pcLogin error==>" + json);
log.error("wx pcLogin error==>" + JSONObject.toJSONString(json));
return ResultBody.error(ResultEnum.APPLET_LOGIN_ERROR, json);
}
unionId = json.getString(WxConstant.UNION_ID);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论