yanghui
2022-10-10 fe5975b8fc4592e3925a678c28a26563669574e9
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/LoginApi.java
@@ -92,6 +92,10 @@
        userService.addOrUpdate(openid, sessionKey, unionid,this.getAppId());
        return tokenService.loginApplets(openid,this.getAppId());
    }
    @PostMapping("/loginTest")
    public R loginTest(@RequestBody LoginRequest loginRequest){
        return tokenService.loginApplets(loginRequest.getCode(),this.getAppId());
    }
    @ApiOperation(value = "H5登录", response = LoginReturnVO.class)
    @PostMapping("loginH5")
@@ -313,9 +317,9 @@
    @GetMapping("uu/getQRCode")
    public R uuLogin(@RequestParam("couponId") String couponId) {
        try {
            WxMaQrcodeService qrCodeService = wxMaConfiguration.getMaService("wx118de8a734d269f0").getQrcodeService();
            WxMaQrcodeService qrCodeService = wxMaConfiguration.getMaService("wx98d62711dfbd8425").getQrcodeService();
            byte[] bytes = qrCodeService.createWxaCodeUnlimitBytes("couponId=" + couponId,
                "packageD/pages/user/getCoupon/getCoupon", true, "release", 30, true, null, false);
                "/pages/user/getCoupon/getCoupon", true, "release", 30, true, null, false);
            return R.ok(String.format("data:image/png;base64,%s", Base64.encode(bytes)));
        } catch (Exception e) {
            log.error("generate QRCode failed:" + e.getMessage());
@@ -330,4 +334,9 @@
        R r=tokenService.tfLogin(uuLoginVO.getMobile(),"Huacheng@123","wx118de8a734d269f0");
        return r;
    }
    @ApiOperation("用户授权")
    @GetMapping("/accept")
    public R accept(){
        return userService.accept(this.getUserId());
    }
}