获取用户手机号码
获取用户手机号码
//小程序根据code获取用户openId
String result = HttpRequest.sendGet("https://api.weixin.qq.com/sns/jscode2session",
"appid=" + FgStaticParam.AppId + //小程序APPID
"&secret="+ CloudSignHelper.wxspSecret + //小程序秘钥
"&js_code="+ registerReq.getCode() + //前端传来的code
"&grant_type=authorization_code");
JSONObject jsonObject = JSONObject.parseObject(result);
JSONObject userInfo = (JSONObject) getUserInfo(registerReq.getMobile(), //前端传来的手机加密串
jsonObject.get("session_key").