| | |
| | | @Value("${wx.appletsAppSecret}") |
| | | private String wxAppletsAppSecret; |
| | | |
| | | @Value("{wx.officialAccountAppSecret}") |
| | | private String officialAccountAppSecret; |
| | | |
| | | @Value("${wx.appid}") |
| | | // @Value("${wx.appid}") |
| | | private String webAppId; |
| | | |
| | | @Value("${wx.appSecret}") |
| | | // @Value("${wx.appSecret}") |
| | | private String webAppSecret; |
| | | |
| | | |
| | |
| | | * @param jscode |
| | | * @return |
| | | */ |
| | | public Map<String, Object> code2Session(String jscode) throws Exception{ |
| | | public Map<String, Object> code2Session(String jscode) { |
| | | String url = "https://api.weixin.qq.com/sns/jscode2session?appid=" + wxAppletsAppid + "&secret=" + wxAppletsAppSecret |
| | | + "&js_code=" + jscode + "&grant_type=authorization_code"; |
| | | HttpRequest get = HttpUtil.createGet(url); |