Commit e5ad2787 by 黄森林

微信登录修改

parent 59cf9661
......@@ -292,17 +292,17 @@ public class LoginPwdController extends BaseController {
url += "&secret=";
url += APPSECRET;
url += "&code=" + code + "&grant_type=authorization_code";
JSONObject jsonObject = null;
String jsonObject = null;
try {
jsonObject = HttpHelper.doGet(url);
jsonObject = HttpHelper.sendGet(url);
} catch (Exception e) {
log.error("微信登录获取用户信息失败"+ e.getMessage(),e);
}
if (jsonObject == null) {
return ResponseData.error("微信授权失效,请重新授权!");
}
String openId = jsonObject.getString("openid");
Map<String,Object> map = JSON.parseObject(jsonObject, Map.class);
String openId = map.get("openid").toString();
SysUser sysUser = users.get(0);
Wrapper wrapper = new EntityWrapper<>();
wrapper.eq("id", sysUser.getId());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment