|
@@ -78,11 +78,17 @@ public class UserServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
Map hashMap = new HashMap();
|
|
|
hashMap.put("code", code);
|
|
|
String url = WxApiType.GET_MOBILE_URL.getValue()+"?access_token="+token;
|
|
|
- String json = HttpUtil.post(url, hashMap);
|
|
|
+ String json = HttpUtil.post(url, JSONUtil.toJsonStr(hashMap));
|
|
|
JSONObject jsonObject = JSONUtil.parseObj(json);
|
|
|
log.info("json:{}",jsonObject);
|
|
|
- String access_token = jsonObject.getStr("access_token");
|
|
|
- return access_token;
|
|
|
+ String mobile = "";
|
|
|
+ if(jsonObject != null && jsonObject.getJSONObject("phone_info") != null){
|
|
|
+ JSONObject phoneInfo = jsonObject.getJSONObject("phone_info");
|
|
|
+ // String phoneNumber = phoneInfo.getStr("phoneNumber");
|
|
|
+ mobile = phoneInfo.getStr("purePhoneNumber");
|
|
|
+
|
|
|
+ }
|
|
|
+ return mobile;
|
|
|
}
|
|
|
|
|
|
public UserInfo getMyInfo(UserParam userParam){
|