Explorar o código

后端页面BUG修复

anderx %!s(int64=2) %!d(string=hai) anos
pai
achega
4d4759a507

+ 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());
 		}