diff --git a/src/main/java/com/ruoyi/project/system/user/controller/IndexController.java b/src/main/java/com/ruoyi/project/system/user/controller/IndexController.java index 380684a54..ea019889c 100644 --- a/src/main/java/com/ruoyi/project/system/user/controller/IndexController.java +++ b/src/main/java/com/ruoyi/project/system/user/controller/IndexController.java @@ -2,6 +2,7 @@ package com.ruoyi.project.system.user.controller; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import com.ruoyi.framework.core.controller.BaseController; import com.ruoyi.project.system.user.domain.User; @@ -21,16 +22,17 @@ public class IndexController extends BaseController // 系统首页 @RequestMapping("/index") - public String index() throws Exception + public String index(Model model) throws Exception { // 取身份信息 - User currentUser = getUser(); + User user = getUser(); // 根据用户id取出菜单 //List permissions = userService.findPermsListByUserId(currentUser.getUserName()); // 通过model传到页面 //session.setAttribute("permissions", TreeUtil.getChildPerms(permissions, 0)); + model.addAttribute("username", user.getUserName()); return "index"; } diff --git a/src/main/resources/static/img/qr_code.png b/src/main/resources/static/img/qr_code.png index 07b5350a7..ecba6d6a6 100644 Binary files a/src/main/resources/static/img/qr_code.png and b/src/main/resources/static/img/qr_code.png differ diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index 13df614f6..e1152a872 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -32,7 +32,7 @@ image - Beaut-zihan + Beaut-Ruoyi 超级管理员