This commit is contained in:
wolegca 2019-09-30 16:44:06 +08:00
parent 946e989465
commit 3c7e98505b
3 changed files with 58 additions and 3 deletions

46
404.html Normal file
View File

@ -0,0 +1,46 @@
---
permalink:/404.html
---
<!DOCTYPE html>
<html lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<link rel="stylesheet" href="css/index.css">
<link rel="stylesheet" href="css/myui.css">
<title>LAOZHONGYI BLOG</title>
</head>
<body>
<div class="container clearfix">
<div id="blog-title">AHPU 老中医的博客</div>
<input type="checkbox" id="menu-control">
<div class="menu-container">
<ul>
<li><a href="/">首页</a></li>
<li><span>关于</span></li>
<li><label for="menu-control">返回</label></li>
</ul>
</div>
<label for="menu-control" class="content-mask"></label>
<label for="menu-control" class="menu-button-container">
<div class="menu-button">
<span></span>
<span></span>
<span></span>
</div>
</label>
<div class="NotFound">
</div>
</div>
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
<script src="js/drag.js"></script>
<script src="js/initialize.js"></script>
<script src="js/404.js"></script>
</body>
</html>

3
js/404.js Normal file
View File

@ -0,0 +1,3 @@
message.alert('404 Not Found', '您所查找的页面不存在',function(){
window.location.href = '/';
});

View File

@ -29,10 +29,13 @@ $(function () {
m.remove(); m.remove();
}, 300); }, 300);
message.alertCode = ''; message.alertCode = '';
if(message.callback)
message.callback();
}); });
})(); })();
var message = new function () { var message = new function () {
this.callback = undefined;
this.alertCode = ''; this.alertCode = '';
this.alert = function () { this.alert = function () {
@ -43,7 +46,8 @@ var message = new function () {
} }
var arg1 = arguments[0], var arg1 = arguments[0],
arg2 = arguments[1]; arg2 = arguments[1],
callback = arguments[2];
if (arguments.length <= 1) { if (arguments.length <= 1) {
header = '提示'; header = '提示';
@ -53,11 +57,13 @@ var message = new function () {
content = (arg2 === undefined ? '提示内容' : arg2); content = (arg2 === undefined ? '提示内容' : arg2);
} }
message.appendHtml(header, content); message.callback = callback;
appendHtml(header, content);
} }
this.appendHtml = function (header, content) { function appendHtml (header, content) {
var id = uuid(); var id = uuid();
var html = var html =
'<div class="msg-container" id="mc-' + id + '">' + '<div class="msg-container" id="mc-' + id + '">' +