xiaoshushu 4 роки тому
батько
коміт
21c1fdd356

+ 3 - 3
ruoyi-app/src/main/java/com/ruoyi/app/interceptor/AuthenticationInterceptor.java

@@ -48,19 +48,19 @@ public class AuthenticationInterceptor implements HandlerInterceptor {
         // 执行认证
         if (token == null) {
             //throw new RuntimeException("无token,请重新登录");
-            ServletUtils.renderString(httpServletResponse, JSON.toJSONString(AjaxResult.error(HttpStatus.UNAUTHORIZED, "未登,请先登录")));
+            ServletUtils.renderString(httpServletResponse, JSON.toJSONString(AjaxResult.error(HttpStatus.UNAUTHORIZED, "未登,请先登录")));
             return false;
         }
         // 获取 token 中的 loginUser
         AppLoginUser loginUser = appTokenService.getLoginUser(token);
         if (loginUser == null) {
            // throw new RuntimeException("用户不存在,请重新登录");
-            ServletUtils.renderString(httpServletResponse, JSON.toJSONString(AjaxResult.error(HttpStatus.UNAUTHORIZED, "未登,请先登录")));
+            ServletUtils.renderString(httpServletResponse, JSON.toJSONString(AjaxResult.error(HttpStatus.UNAUTHORIZED, "未登,请先登录")));
             return false;
         }
         AppMemberVo user = loginUser.getUser();
         if (user == null) {
-            ServletUtils.renderString(httpServletResponse, JSON.toJSONString(AjaxResult.error(HttpStatus.UNAUTHORIZED, "未登,请先登录")));
+            ServletUtils.renderString(httpServletResponse, JSON.toJSONString(AjaxResult.error(HttpStatus.UNAUTHORIZED, "未登,请先登录")));
             return false;
             //throw new RuntimeException("用户不存在,请重新登录");
         }