From 3b09eb084576dd6be9a7b342edf345293bcc6459 Mon Sep 17 00:00:00 2001 From: jiangqs <jiangqs> Date: 星期二, 25 七月 2023 09:57:27 +0800 Subject: [PATCH] bug --- ruoyi-auth/src/main/java/com/ruoyi/auth/controller/QwH5Controller.java | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ruoyi-auth/src/main/java/com/ruoyi/auth/controller/QwH5Controller.java b/ruoyi-auth/src/main/java/com/ruoyi/auth/controller/QwH5Controller.java index 6c749ca..b975a1e 100644 --- a/ruoyi-auth/src/main/java/com/ruoyi/auth/controller/QwH5Controller.java +++ b/ruoyi-auth/src/main/java/com/ruoyi/auth/controller/QwH5Controller.java @@ -37,8 +37,11 @@ @Autowired private TokenService tokenService; - @Value("${h5.redirectUriBase}") - private String redirectUriBase; + @Value("${h5.redirectMerchantUriBase}") + private String redirectMerchantUriBase; + + @Value("${h5.redirectEmployeeUriBase}") + private String redirectEmployeeUriBase; /** @@ -51,7 +54,17 @@ @ApiOperation("构造网页授权链接") public R<OauthUrlVo> oauthUrl(@ApiParam(value = "授权重定向地址", required = true) @RequestParam("redirectUri") String redirectUri) throws UnsupportedEncodingException { // 普通应用 - redirectUri = redirectUriBase + redirectUri; + redirectUri = redirectMerchantUriBase + redirectUri; + String oauthRedirectUrl = URLEncoder.encode(redirectUri,"utf-8"); + String oauthUrl = qywxInnerService.getOauthUrl(oauthRedirectUrl); + return R.ok(new OauthUrlVo(oauthUrl)); + } + + @GetMapping({"/h5/oauthStaffUrl"}) + @ApiOperation("构造网页授权链接") + public R<OauthUrlVo> oauthStaffUrl(@ApiParam(value = "授权重定向地址", required = true) @RequestParam("redirectUri") String redirectUri) throws UnsupportedEncodingException { + // 普通应用 + redirectUri = redirectEmployeeUriBase + redirectUri; String oauthRedirectUrl = URLEncoder.encode(redirectUri,"utf-8"); String oauthUrl = qywxInnerService.getOauthUrl(oauthRedirectUrl); return R.ok(new OauthUrlVo(oauthUrl)); -- Gitblit v1.7.1