提交初始版本1.0

This commit is contained in:
yzz_ivy 2018-02-22 17:56:20 +08:00
parent c22e3d5f4b
commit 5e2777d15f
3 changed files with 5 additions and 3 deletions

View File

@ -2,6 +2,7 @@ package com.ruoyi.project.system.user.controller;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import com.ruoyi.framework.core.controller.BaseController; import com.ruoyi.framework.core.controller.BaseController;
import com.ruoyi.project.system.user.domain.User; import com.ruoyi.project.system.user.domain.User;
@ -21,16 +22,17 @@ public class IndexController extends BaseController
// 系统首页 // 系统首页
@RequestMapping("/index") @RequestMapping("/index")
public String index() throws Exception public String index(Model model) throws Exception
{ {
// 取身份信息 // 取身份信息
User currentUser = getUser(); User user = getUser();
// 根据用户id取出菜单 // 根据用户id取出菜单
//List<Permission> permissions = userService.findPermsListByUserId(currentUser.getUserName()); //List<Permission> permissions = userService.findPermsListByUserId(currentUser.getUserName());
// 通过model传到页面 // 通过model传到页面
//session.setAttribute("permissions", TreeUtil.getChildPerms(permissions, 0)); //session.setAttribute("permissions", TreeUtil.getChildPerms(permissions, 0));
model.addAttribute("username", user.getUserName());
return "index"; return "index";
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

View File

@ -32,7 +32,7 @@
<span><img src="img/profile_small.jpg" alt="image" class="img-circle" height="60" width="60"/></span> <span><img src="img/profile_small.jpg" alt="image" class="img-circle" height="60" width="60"/></span>
<a data-toggle="dropdown" class="dropdown-toggle" href="#"> <a data-toggle="dropdown" class="dropdown-toggle" href="#">
<span class="clear"> <span class="clear">
<span class="block m-t-xs"><strong class="font-bold">Beaut-zihan</strong></span> <span class="block m-t-xs"><strong class="font-bold" th:text="${username}">Beaut-Ruoyi</strong></span>
<span class="text-muted text-xs block">超级管理员</b></span> <span class="text-muted text-xs block">超级管理员</b></span>
</span> </span>
</a> </a>