Commit 8a531aa8 by xuwenhao

2.5修改

parent 36c41050
...@@ -125,7 +125,7 @@ public class SsWxLogin { ...@@ -125,7 +125,7 @@ public class SsWxLogin {
//查询送水工站点信息 //查询送水工站点信息
WaterStationUserVo waterStationUser = waterStationUserService.selectWaterStationUserByPhone(waterUser.getPhoneNum()); WaterStationUserVo waterStationUser = waterStationUserService.selectWaterStationUserByPhone(waterUser.getPhoneNum());
if (StringUtils.isNull(waterStationUser)){ if (StringUtils.isNull(waterStationUser)){
throw new ServiceException("未查询到您管理的站点信息,请联系管理员!"); return AjaxResult.error("未查询到你的站点信息,请联系管理员!");
} }
map.put("waterStationUser",waterStationUser); map.put("waterStationUser",waterStationUser);
return AjaxResult.success(map); return AjaxResult.success(map);
......
...@@ -59,9 +59,9 @@ public class SsWxUserInfoUtils { ...@@ -59,9 +59,9 @@ public class SsWxUserInfoUtils {
//获取phone //获取phone
String url = "https://api.weixin.qq.com/wxa/business/getuserphonenumber" String url = "https://api.weixin.qq.com/wxa/business/getuserphonenumber"
+ "?access_token=" + accessToken; + "?access_token=" + accessToken;
Map<String, String> param = new HashMap<>(); String json = "{\"code\":\"" + code + "\"}";
param.put("code",code); String s = HttpClientUtil.doPostJson(url, json);
JSONObject wxJson = JSONUtil.parseObj(HttpClientUtil.doPost(url, param)); JSONObject wxJson = JSONUtil.parseObj(s);
//返回手机号信息 //返回手机号信息
JSONObject phone_info = JSONUtil.parseObj(wxJson.get("phone_info")); JSONObject phone_info = JSONUtil.parseObj(wxJson.get("phone_info"));
//用户绑定的手机号(国外手机号会有区号) //用户绑定的手机号(国外手机号会有区号)
......
...@@ -67,9 +67,8 @@ public class WxUserInfoUtils { ...@@ -67,9 +67,8 @@ public class WxUserInfoUtils {
//获取phone //获取phone
String url = "https://api.weixin.qq.com/wxa/business/getuserphonenumber" String url = "https://api.weixin.qq.com/wxa/business/getuserphonenumber"
+ "?access_token=" + accessToken; + "?access_token=" + accessToken;
Map<String, String> param = new HashMap<>(); String json = "{\"code\":\"" + code + "\"}";
param.put("code",code); JSONObject wxJson = JSONUtil.parseObj(HttpClientUtil.doPostJson(url, json));
JSONObject wxJson = JSONUtil.parseObj(HttpClientUtil.doPost(url, param));
//返回手机号信息 //返回手机号信息
JSONObject phone_info = JSONUtil.parseObj(wxJson.get("phone_info")); JSONObject phone_info = JSONUtil.parseObj(wxJson.get("phone_info"));
//用户绑定的手机号(国外手机号会有区号) //用户绑定的手机号(国外手机号会有区号)
......
...@@ -134,21 +134,21 @@ xss: ...@@ -134,21 +134,21 @@ xss:
# 订水端小程序 # 订水端小程序
wx: wx:
#测试 #测试
appId: wxcabea5c944c4327c # appId: wxcabea5c944c4327c
appSecret: bd486fd54bd1ea5e9b198911d765ce6a # appSecret: bd486fd54bd1ea5e9b198911d765ce6a
access-token-uri: https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=${wx.appId}&secret=${wx.appSecret}
#正式
# appId: wx75635671bf9fe9bb
# appSecret: 5ac4f25af14d7cfb3e62870fa1719459
# access-token-uri: https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=${wx.appId}&secret=${wx.appSecret} # access-token-uri: https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=${wx.appId}&secret=${wx.appSecret}
#正式
appId: wx75635671bf9fe9bb
appSecret: 5ac4f25af14d7cfb3e62870fa1719459
access-token-uri: https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=${wx.appId}&secret=${wx.appSecret}
# 送水端小程序 # 送水端小程序
sswx: sswx:
#测试 #测试
appId: wxc89600b5b0aee68d # appId: wxc89600b5b0aee68d
appSecret: 27ebe3778435c719cc1b97f260b7e026 # appSecret: 27ebe3778435c719cc1b97f260b7e026
access-token-uri: https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=${sswx.appId}&secret=${sswx.appSecret}
#正式
# appId: wx3c0181d9800dfbf2
# appSecret: d1382
# access-token-uri: https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=${sswx.appId}&secret=${sswx.appSecret} # access-token-uri: https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=${sswx.appId}&secret=${sswx.appSecret}
#正式
appId: wx3c0181d9800dfbf2
appSecret: d1382ba5e014038ee38eda00d737ac43
access-token-uri: https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=${sswx.appId}&secret=${sswx.appSecret}
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