添加项目文件。
This commit is contained in:
95
HT.Cloud.Web/Views/Home/Error.cshtml
Normal file
95
HT.Cloud.Web/Views/Home/Error.cshtml
Normal file
@ -0,0 +1,95 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<title>页面不存在</title>
|
||||
<link rel="stylesheet" href="~/lib/layui/css/layui.css?v=@HT.Cloud.Code.GlobalContext.GetVersion()" />
|
||||
<link rel="stylesheet" href="~/css/watercloud.css?v=@HT.Cloud.Code.GlobalContext.GetVersion()" />
|
||||
|
||||
<style>
|
||||
.listen-btn a {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.listen-btn a:hover {
|
||||
color: #ffffff;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="page-loading">
|
||||
<div class="ball-loader">
|
||||
<span></span><span></span><span></span><span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="error-page">
|
||||
<img id="errorimg" class="error-page-img">
|
||||
<div class="error-page-info">
|
||||
<h1 id="errormsg"></h1>
|
||||
<div class="error-page-info-desc" id="msg">
|
||||
</div>
|
||||
<div>
|
||||
<button class="layui-btn listen-btn" onclick="returnIndex()">返回首页</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="~/lib/jquery-3.4.1/jquery-3.4.1.min.js?v=@HT.Cloud.Code.GlobalContext.GetVersion()" charset="utf-8"></script>
|
||||
<script src="~/js/cookie/jquery.cookie.js?v=@HT.Cloud.Code.GlobalContext.GetVersion()"></script>
|
||||
<script src="~/lib/layui/layui.js?v=@HT.Cloud.Code.GlobalContext.GetVersion()" charset="utf-8"></script>
|
||||
<script src="~/js/lay-config.js?v=@HT.Cloud.Code.GlobalContext.GetVersion()" charset="utf-8"></script>
|
||||
<script src="~/js/framework-ui.js?v=@HT.Cloud.Code.GlobalContext.GetVersion()"></script>
|
||||
<script type="text/javascript">
|
||||
window.onbeforeunload = returnIndex;
|
||||
window.onunload = returnIndex;
|
||||
layui.use(['layer'], function () {
|
||||
var $ = layui.$;
|
||||
var msg = $.request("msg");
|
||||
if (window.location.hash.indexOf('#/') > -1) {
|
||||
$.cookie("wc_returnurl", window.location.hash.substring(2, window.location.hash.length), {
|
||||
expires: 1, path: '/'
|
||||
});
|
||||
}
|
||||
switch (msg) {
|
||||
case "401":
|
||||
$('#msg').html("帐号已在其它地方登录!");
|
||||
$('#errormsg').html(msg);
|
||||
$('#errorimg').attr('src', "../images/403.svg");
|
||||
break;
|
||||
case "403":
|
||||
$('#msg').html("权限不足!");
|
||||
$('#errormsg').html(msg);
|
||||
$('#errorimg').attr('src', "../images/403.svg");
|
||||
break;
|
||||
case "404":
|
||||
$('#msg').html("页面不存在!");
|
||||
$('#errormsg').html(msg);
|
||||
$('#errorimg').attr('src', "../images/404.svg");
|
||||
break;
|
||||
case "408":
|
||||
$('#msg').html("登录已超时!");
|
||||
$('#errormsg').html(msg);
|
||||
$('#errorimg').attr('src', "../images/404.svg");
|
||||
break;
|
||||
case "500":
|
||||
$('#msg').html("系统错误!");
|
||||
$('#errormsg').html(msg);
|
||||
$('#errorimg').attr('src', "../images/500.svg");
|
||||
break;
|
||||
default:
|
||||
$('#msg').html("请求出错!");
|
||||
$('#errormsg').html("400");
|
||||
$('#errorimg').attr('src', "../images/404.svg");
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
})
|
||||
function returnIndex() {
|
||||
top.location.href = "/Login/Index";
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
Reference in New Issue
Block a user