wang-hao-jie
2022-01-07 0f2202dfcea3309c1b0e7515f6db5fbdc83d51d1
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/wx/IndexController.java
@@ -76,6 +76,8 @@
        if(one==null){
            return ResultUtil.error(openid);//首次登陆需绑定零售许可证
        }else {
            one.setLoginNum(one.getLoginNum()+1);
            iCustomerService.saveOrUpdate(one);
            return ResultUtil.data(one,"登录成功");
        }
    }
@@ -83,7 +85,7 @@
    public static JSONObject getSessionKeyOrOpenId(String code){
        //微信端登录code
        String wxCode = code;
        String requestUrl = "https://api.weixin.qq.com/sns/jscode2session?appid=wx0f10f6d253f3ee6b&secret=4d4cbc8da31a96559114ad693de70631&grant_type=authorization_code&js_code="+code;
        String requestUrl = "https://api.weixin.qq.com/sns/jscode2session?appid=wx77c0d2c54010b7e4&secret=2282710e890670e916c189347d70a7c5&grant_type=authorization_code&js_code="+code;
        JSONObject jsonObject = JSONUtil.parseObj( HttpUtil.get(requestUrl));
        return jsonObject;
    }