|
|
|
@ -272,7 +272,6 @@ public class WechatController { |
|
|
|
|
HttpServletRequest request, HttpServletResponse response) { |
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
System.out.println("--------------获取access_token-----------------------"); |
|
|
|
|
// 获取access_token
|
|
|
|
|
Map<String, Object> params = new HashMap<>(); |
|
|
|
|
params.put("appid", SysConst.getSysConfig().getWxH5AppId()); |
|
|
|
@ -280,8 +279,6 @@ public class WechatController { |
|
|
|
|
params.put("code", code); |
|
|
|
|
params.put("grant_type", "authorization_code"); |
|
|
|
|
JSONObject jsonObject = HttpsUtils.doGet("https://api.weixin.qq.com/sns/oauth2/access_token", params); |
|
|
|
|
System.out.println(jsonObject.toJSONString()); |
|
|
|
|
System.out.println("-----------------获取access_token--------------------"); |
|
|
|
|
String accessToken = jsonObject.getString("access_token"); |
|
|
|
|
String openid = jsonObject.getString("openid"); |
|
|
|
|
if (StringUtils.isBlank(accessToken) || StringUtils.isBlank(openid)) { |
|
|
|
|