zhaolei
2020-11-20 921de2254ff5712a44ed8575ee8efe34252f6603
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
@inherits LayoutComponentBase
@using Bootstrap.Admin.Models
 
<div class="error-content">
    <div class="error-wrapper text-center">
        <img src="@model?.Image.ToBlazorLink()" />
        <h1>@model?.Content</h1>
        <h3>@model?.Detail</h3>
        <p><a href="/Account/Logout">登录</a> <span>或者</span> <a href="@model?.ReturnUrl.ToBlazorLink()">返回首页</a> <span>或者</span> <a href="/healths-ui">系统自检</a></p>
        @if (@model?.Id == 403)
        {
            <div>
                <p>也可能是以下原因导致您没有权限</p>
                <p>1. 没有登录,请登录后查看</p>
                <p>2. 当前用户未获得此资源的相应权限,请联系管理员</p>
            </div>
        }
    </div>
    @Body
</div>
 
@code {
    protected ErrorModel? model;
 
    protected override void OnInitialized()
    {
        var id = 404;
        model = ErrorModel.CreateById(id);
    }
}