From 7149bcb61b5fa6cf04f22aa9920601de46c53cf2 Mon Sep 17 00:00:00 2001 From: Argo Windows Date: Wed, 30 Oct 2019 11:12:29 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=B8=AA=E4=BA=BA=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E7=BB=B4=E6=8A=A4=E7=95=8C=E9=9D=A2=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=BA=94=E7=94=A8=E5=90=8D=E7=A7=B0=E7=9B=B4=E6=8E=A5=E8=8E=B7?= =?UTF-8?q?=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/admin/Bootstrap.Admin/Models/HeaderBarModel.cs | 1 - src/admin/Bootstrap.Admin/Models/ProfilesModel.cs | 8 ++++++++ src/admin/Bootstrap.Admin/Views/Admin/Profiles.cshtml | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/admin/Bootstrap.Admin/Models/HeaderBarModel.cs b/src/admin/Bootstrap.Admin/Models/HeaderBarModel.cs index c71a9a2c..d3af6628 100644 --- a/src/admin/Bootstrap.Admin/Models/HeaderBarModel.cs +++ b/src/admin/Bootstrap.Admin/Models/HeaderBarModel.cs @@ -36,7 +36,6 @@ namespace Bootstrap.Admin.Models // 后台系统网站图标跟随个人中心设置的默认应用站点的展示 WebSiteIcon = DictHelper.RetrieveWebIcon(AppId); WebSiteLogo = DictHelper.RetrieveWebLogo(AppId); - } } diff --git a/src/admin/Bootstrap.Admin/Models/ProfilesModel.cs b/src/admin/Bootstrap.Admin/Models/ProfilesModel.cs index ff2a4616..e01cb5e2 100644 --- a/src/admin/Bootstrap.Admin/Models/ProfilesModel.cs +++ b/src/admin/Bootstrap.Admin/Models/ProfilesModel.cs @@ -25,6 +25,11 @@ namespace Bootstrap.Admin.Models /// public bool External { get; } + /// + /// 获得 当前用户默认应用程序名称 + /// + public string AppName { get; } + /// /// /// @@ -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; } } } diff --git a/src/admin/Bootstrap.Admin/Views/Admin/Profiles.cshtml b/src/admin/Bootstrap.Admin/Views/Admin/Profiles.cshtml index e57c1493..3daf44f3 100644 --- a/src/admin/Bootstrap.Admin/Views/Admin/Profiles.cshtml +++ b/src/admin/Bootstrap.Admin/Views/Admin/Profiles.cshtml @@ -87,7 +87,7 @@
- +