瀏覽代碼

修改飞书登录接口跳转

syh 5 年之前
父節點
當前提交
feb95da129

+ 3 - 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/LoginController.java

@@ -92,12 +92,12 @@ public class LoginController {
     @GetMapping("/feishu/auth")
     public void feishuAuth(HttpServletRequest request,
                            HttpServletResponse response,
-                           @RequestParam("code") String code,
-                           @RequestParam("state") String state) throws IOException {
+                           @RequestParam(name = "code",defaultValue = "code") String code,
+                           @RequestParam(name = "state",defaultValue = "_t") String state) throws IOException {
         Result<JSONObject> result = new Result<>();
         //1:根据code值获取用户飞书信息
         try {
-            if(null == code||code.trim().equals("")){
+            if(code.trim().equals("code")){
                 String url = AuthProvider.getAuthUrl("");
                 response.sendRedirect(url);
                 return ;