diff --git a/404.html b/404.html new file mode 100644 index 0000000..44b61e6 --- /dev/null +++ b/404.html @@ -0,0 +1,46 @@ +--- +permalink:/404.html +--- + + + + + + + + + + LAOZHONGYI BLOG + + + +
+
AHPU 老中医的博客
+ + + + + +
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/js/404.js b/js/404.js new file mode 100644 index 0000000..d0f64be --- /dev/null +++ b/js/404.js @@ -0,0 +1,3 @@ +message.alert('404 Not Found', '您所查找的页面不存在',function(){ + window.location.href = '/'; +}); \ No newline at end of file diff --git a/js/initialize.js b/js/initialize.js index dce6468..5266706 100644 --- a/js/initialize.js +++ b/js/initialize.js @@ -29,10 +29,13 @@ $(function () { m.remove(); }, 300); message.alertCode = ''; + if(message.callback) + message.callback(); }); })(); var message = new function () { + this.callback = undefined; this.alertCode = ''; this.alert = function () { @@ -43,7 +46,8 @@ var message = new function () { } var arg1 = arguments[0], - arg2 = arguments[1]; + arg2 = arguments[1], + callback = arguments[2]; if (arguments.length <= 1) { header = '提示'; @@ -53,11 +57,13 @@ var message = new function () { 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 html = '
' +