提交 39f5ac1f authored 作者: zhoushaopan's avatar zhoushaopan

feat[浙里办]: 修改微信返回当前登陆用户信息的问题

[修改微信返回当前登陆用户信息的问题]
上级 ca8f39ab
...@@ -60,26 +60,28 @@ public class ZlbWeChatController { ...@@ -60,26 +60,28 @@ public class ZlbWeChatController {
if (userInfoByToken != null){ if (userInfoByToken != null){
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
JSONObject personInfo = userInfoByToken.getJSONObject("personInfo"); JSONObject personInfo = userInfoByToken.getJSONObject("personInfo");
String birthday = personInfo.getString("birthday"); if (personInfo != null){
String userNameEnc = personInfo.getString("userNameEnc"); String birthday = personInfo.getString("birthday");
String idtype = personInfo.getString("idtype"); String userNameEnc = personInfo.getString("userNameEnc");
String gender = personInfo.getString("gender"); String idtype = personInfo.getString("idtype");
String nation = personInfo.getString("nation"); String gender = personInfo.getString("gender");
String userId = personInfo.getString("userId"); String nation = personInfo.getString("nation");
String idNoEnc = personInfo.getString("idNoEnc"); String userId = personInfo.getString("userId");
String email = personInfo.getString("email"); String idNoEnc = personInfo.getString("idNoEnc");
String phoneEnc = personInfo.getString("phoneEnc"); String email = personInfo.getString("email");
JSONObject attributes = personInfo.getJSONObject("attributes"); String phoneEnc = personInfo.getString("phoneEnc");
jsonObject.put("birthday",birthday); JSONObject attributes = personInfo.getJSONObject("attributes");
jsonObject.put("userNameEnc",userNameEnc); jsonObject.put("birthday",birthday);
jsonObject.put("idtype",idtype); jsonObject.put("userNameEnc",userNameEnc);
jsonObject.put("gender",gender); jsonObject.put("idtype",idtype);
jsonObject.put("nation",nation); jsonObject.put("gender",gender);
jsonObject.put("userId",userId); jsonObject.put("nation",nation);
jsonObject.put("email",email); jsonObject.put("userId",userId);
jsonObject.put("phoneEnc",phoneEnc); jsonObject.put("email",email);
jsonObject.put("idNoEnc",idNoEnc); jsonObject.put("phoneEnc",phoneEnc);
jsonObject.put("attributes",attributes); jsonObject.put("idNoEnc",idNoEnc);
jsonObject.put("attributes",attributes);
}
return jsonObject; return jsonObject;
} }
return new JSONObject(); return new JSONObject();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论