Skip to content

Commit

Permalink
改变首页样式
Browse files Browse the repository at this point in the history
  • Loading branch information
xwj-vic committed Apr 7, 2017
1 parent 67d91b9 commit f37f597
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/main/java/web/WebController/HomepageController.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
* Created by xuweijie on 2017/3/11.
*/
@Controller
public class HomepageController {
@RequestMapping("/home")
public class HomepageController{

@RequestMapping(value = "/homepage")
@RequestMapping(value = "homepage")
public String loginsuccess( Model model) throws Exception{
Subject subject= SecurityUtils.getSubject();
String username= (String) subject.getPrincipal();
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/spring/spring-shiro.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<property name="securityManager" ref="securityManager"/>
<!--loginUrl认证提交地址,如果没有认证将会请求此地址进行认证,请求此地址将由formAuthenticationFilter进行表单认证-->
<property name="loginUrl" value="/login"/>
<property name="successUrl" value="/homepage"/>
<property name="successUrl" value="/home/homepage"/>

<!--自定义的filter-->
<property name="filters">
Expand Down
77 changes: 74 additions & 3 deletions src/main/webapp/WEB-INF/jsp/Homepage.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,82 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>成功登录</title>
<meta charset="utf-8">
<title>Home</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="../resources/layui/css/layui.css" media="all">
<link rel="stylesheet" href="//res.layui.com/css/global.css?t=1490981130731" media="all">
<script src="../resources/layui/layui.js" charset="utf-8"></script>
<script>
layui.use('element', function(){
var element = layui.element();
element.on('nav(demo)', function(elem){
layer.msg(elem.text());
});
});
</script>
</head>
<body>
<div align="center">
<h1>用户名:${username}</h1>


<div class="layui-layout layui-layout-admin">
<div class="layui-header header header-demo">
<div class="layui-main">
<a class="logo" href="#">
<img src="//res.layui.com/images/layui/logo.png" alt="layui">
</a>

<ul class="layui-nav" lay-filter="">
<li class="layui-nav-item"><a href="">最新活动</a></li>
<li class="layui-nav-item layui-this"><a href="">产品</a></li>
<li class="layui-nav-item"><a href="">大数据</a></li>
<li class="layui-nav-item">
<a href="javascript:;">解决方案</a>
<dl class="layui-nav-child"> <!-- 二级菜单 -->
<dd><a href="">移动模块</a></dd>
<dd><a href="">后台模版</a></dd>
<dd><a href="">电商平台</a></dd>
</dl>
</li>
<li class="layui-nav-item"><a href="">社区</a></li>
</ul>
<span class="layui-nav-bar" style="left: 44px; top: 55px; width: 0px; opacity: 0;"></span></ul>
</div>
</div>

<div class="layui-side layui-bg-black">
<div class="layui-side-scroll">
<ul class="layui-nav layui-nav-tree site-demo-nav">
<li class="layui-nav-item layui-nav-itemed">
<a href="javascript:;">默认展开</a>
<dl class="layui-nav-child">
<dd><a href="javascript:;">选项1</a></dd>
<dd><a href="javascript:;">选项2</a></dd>
<dd><a href="">跳转</a></dd>
</dl>
</li>
<li class="layui-nav-item">
<a href="javascript:;">解决方案</a>
<dl class="layui-nav-child">
<dd><a href="javascript:;">移动模块</a></dd>
<dd><a href="javascript:;">后台模版</a></dd>
<dd><a href="javascript:;">电商平台</a></dd>
</dl>
</li>
<li class="layui-nav-item"><a href="">产品</a></li>
<li class="layui-nav-item"><a href="">大数据</a></li>
</ul>
</div>
</div>

<div class="layui-body layui-tab-content site-demo site-demo-body">
<ul class="layui-tab-title site-demo-title">
<li>预览</li>
<li>查看代码</li>
<li>帮助</li>
</ul>
</div>
</div>

</body>
Expand Down

0 comments on commit f37f597

Please sign in to comment.