Skip to content

Commit ea6d993

Browse files
committed
web模块优化
1 parent 3a335de commit ea6d993

3 files changed

Lines changed: 14 additions & 6 deletions

File tree

website/src/main/java/info/xiaomo/website/controller/IndexController.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
* いま 最高の表現 として 明日最新の始発..~
1717
* Today the best performance as tomorrow newest starter!
1818
* Created by IntelliJ IDEA.
19-
*
19+
* <p>
2020
* author: xiaomo
2121
* github: https://github.com/xiaomoinfo
2222
* email: xiaomo@xiaomo.info
23-
23+
* <p>
2424
* Date: 2016/11/21 10:53
2525
* Copyright(©) 2015 by xiaomo.
2626
**/
@@ -42,6 +42,8 @@ public String index(HttpSession session) {
4242
if (all.size() > 0) {
4343
SystemSetModel model = all.get(0);
4444
session.setAttribute("webSet", model);
45+
} else {
46+
session.setAttribute("webSet", new SystemSetModel());
4547
}
4648
return UserView.INDEX.getName();
4749
}

website/src/main/resources/templates/error.ftl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@
77
<meta http-equiv="X-UA-Compatible" content="ie=edge">
88
<title>出错</title>
99
</head>
10-
<body>
11-
错误
10+
<body onload="jumpToIndex()">
11+
12+
<script>
13+
function jumpToIndex() {
14+
window.location.href ="/";
15+
}
16+
17+
</script>
1218
</body>
1319
</html>

website/src/main/resources/templates/index.ftl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<meta charset="UTF-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1">
66
<meta http-equiv="x-ua-compatible" content="ie=edge">
7-
<link rel="icon" href="${webSet.icon}">
8-
<title>${webSet.siteName}</title>
7+
<link rel="icon" href="http://image.xiaomo.info/logo/logo.png">
8+
<title>小莫的个人网站</title>
99
<link href="//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
1010
<link rel="stylesheet" href="/css/style.css">
1111
</head>

0 commit comments

Comments
 (0)