|
|
@@ -87,4 +87,18 @@ public class WechatAuthController { |
|
|
throw new RuntimeException(e); |
|
|
throw new RuntimeException(e); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/getMobilePreAuthUrl") |
|
|
|
|
|
@ResponseBody |
|
|
|
|
|
public String getMobilePreAuthUrl(HttpServletRequest request, HttpServletResponse response) { |
|
|
|
|
|
String host = request.getHeader("host"); |
|
|
|
|
|
String url = "https://" + host + "/api/wt_auth/jump"; |
|
|
|
|
|
try { |
|
|
|
|
|
url = openService.getWxOpenComponentService().getMobilePreAuthUrl(url); |
|
|
|
|
|
return url; |
|
|
|
|
|
} catch (WxErrorException e) { |
|
|
|
|
|
logger.error("getMobilePreAuthUrl", e); |
|
|
|
|
|
throw new RuntimeException(e); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |