luodangjia
2024-11-28 06f455915bb9d11caa8829942f9007809ee9ae3d
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/weChat/WeChatUtil.java
@@ -24,13 +24,10 @@
    @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;
@@ -39,7 +36,7 @@
     * @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);