Quellcode durchsuchen

后端页面BUG修复

anderx vor 2 Jahren
Ursprung
Commit
4d4759a507
1 geänderte Dateien mit 2 neuen und 3 gelöschten Zeilen
  1. 2 3
      src/main/java/com/goafanti/common/controller/BaseController.java

+ 2 - 3
src/main/java/com/goafanti/common/controller/BaseController.java

@@ -124,7 +124,8 @@ public class BaseController {
 		model.addAttribute("avatarUploadHost", avatarUploadHost);
 		model.addAttribute("portalHost", portalHost);
 		model.addAttribute("basePath", request.getContextPath());
-
+		model.addAttribute("shiro", SecurityUtils.getSubject());
+		model.addAttribute("isLogin", TokenManager.isLogin());
 		model.addAttribute("videoServer", videoServer);
 		model.addAttribute("isAdmin", false);
 		int yearCount=0;
@@ -134,8 +135,6 @@ public class BaseController {
 		if (TokenManager.isLogin() && TokenManager.getToken() instanceof User) {
 			model.addAttribute("userData", TokenManager.getUserToken());
 			model.addAttribute("userName", TokenManager.getUserToken().getNickname());
-			model.addAttribute("shiro", SecurityUtils.getSubject());
-			model.addAttribute("isLogin", TokenManager.isLogin());
 			model.addAttribute("csrf", TokenManager.getCSRF());
 		}