refactor: 个人中心维护界面默认应用名称直接获取
This commit is contained in:
parent
2d0fba0eac
commit
7149bcb61b
|
@ -36,7 +36,6 @@ namespace Bootstrap.Admin.Models
|
|||
// 后台系统网站图标跟随个人中心设置的默认应用站点的展示
|
||||
WebSiteIcon = DictHelper.RetrieveWebIcon(AppId);
|
||||
WebSiteLogo = DictHelper.RetrieveWebLogo(AppId);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -25,6 +25,11 @@ namespace Bootstrap.Admin.Models
|
|||
/// </summary>
|
||||
public bool External { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 获得 当前用户默认应用程序名称
|
||||
/// </summary>
|
||||
public string AppName { get; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
@ -46,6 +51,9 @@ namespace Bootstrap.Admin.Models
|
|||
}
|
||||
|
||||
if (controller.User.Identity.AuthenticationType != Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationDefaults.AuthenticationScheme) External = true;
|
||||
|
||||
// 设置 当前用户默认应用名称
|
||||
AppName = Applications.FirstOrDefault(app => app.Key == AppId).Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<div class="btn-group" role="group">
|
||||
<button id="app" class="btn btn-success dropdown-select dropdown-toggle" data-toggle="dropdown" data-default-val="" value="@Model.AppId">未设置</button>
|
||||
<button id="app" class="btn btn-success dropdown-select dropdown-toggle" data-toggle="dropdown" value="@Model.AppId">@Model.AppName</button>
|
||||
<div class="dropdown-menu">
|
||||
@foreach (var app in Model.Applications)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue