修改BUG:AccessDenied 页面返回首页无法成功返回 closed #ISHLV

This commit is contained in:
Argo Zhang 2019-03-06 17:15:15 +08:00
parent 4e0cd6b41b
commit b6b90e34e5
2 changed files with 35 additions and 21 deletions

View File

@ -1,17 +1,21 @@
@{
ViewBag.Title = "未授权请求";
Layout = "_Layout";
}
@section css {
<link href="~/css/error.css" rel="stylesheet" asp-append-version="true" />
}
@section javascript {
<script src="~/js/error.js" asp-append-version="true"></script>
}
<section class="error-wrapper">
<img src="~/images/error_icon.png" />
<h1>网页拒绝访问</h1>
<h3>您无权访问本页面请联系网站管理员授权后再查看</h3>
<br />
<a href="@ViewBag.ReturnUrl" target="_top">返回首页</a>
@{
ViewBag.Title = "未授权请求";
Layout = "_Layout";
}
@section css {
<link href="~/css/error.css" rel="stylesheet" asp-append-version="true" />
}
@section javascript {
<script src="~/js/error.js" asp-append-version="true"></script>
}
<section class="error-wrapper">
<img src="~/images/error_icon.png" />
<h1>您的访问受限!</h1>
<h3>服务器拒绝处理您的请求!您可能没有访问此操作的权限</h3>
<p><a href="~/Account/Logout">登录</a> <span>或者</span> <a href="~/Home/Index" target="_top">返回首页</a></p>
<div>
<p>也可能是以下原因导致您没有权限</p>
<p>1. 没有登录,请登录后查看</p>
<p>2. 当前用户未获得此资源的相应权限,请联系管理员</p>
</div>
</section>

View File

@ -1,4 +1,9 @@
body {
html {
font-size: 16px;
-ms-overflow-style: auto;
}
body {
background: #8075c6;
color: #fff;
}
@ -10,16 +15,21 @@ img {
.error-wrapper {
text-align: center;
margin: 0 auto;
max-width: 30rem;
padding: 1rem;
}
.error-wrapper p {
padding-top: 15px;
padding-top: 10px;
}
.error-wrapper div {
text-align: left;
}
a, a:hover, a:focus {
text-decoration: none;
outline: none;
font-size: 14px;
font-weight: 300;
color: #fff;
color: #371ed4;
}