| | |
| | | String url = "https://api.weixin.qq.com/sns/jscode2session?appid=" + wxAppletsAppid + "&secret=" + wxAppletsAppSecret |
| | | + "&js_code=" + jscode + "&grant_type=authorization_code"; |
| | | String forObject = restTemplate.getForObject(url, String.class); |
| | | System.err.println(forObject); |
| | | JSONObject jsonObject = JSON.parseObject(forObject); |
| | | int errcode = jsonObject.getIntValue("errcode"); |
| | | Map<String, String> map = new HashMap<>(); |
| | |
| | | param.put("expire_interval", 1); |
| | | param.put("path", path); |
| | | param.put("query", query); |
| | | param.put("env_version", "trial"); |
| | | param.put("env_version", "release"); |
| | | HttpHeaders httpHeaders = new HttpHeaders(); |
| | | MediaType type=MediaType.parseMediaType("application/json;charset=UTF-8"); |
| | | httpHeaders.setContentType(type); |