From 34e340d9ee982064c39924ec2aded760aa46c551 Mon Sep 17 00:00:00 2001 From: Argo-Surface Date: Fri, 1 Feb 2019 14:08:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9BUG=EF=BC=9A=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=E7=94=A8=E6=88=B7=E6=9C=AA=E8=AE=BE=E7=BD=AE=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E5=A4=B4=E5=83=8F=E6=97=B6=E4=B8=8D=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=8C=E4=BE=9D=E8=B5=96=E7=BB=84=E4=BB=B6?= =?UTF-8?q?Bootstrap.Security.DataAccess=E5=8D=87=E7=BA=A7=E5=88=B01.4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bootstrap.Admin/Models/HeaderBarModel.cs | 2 +- .../Bootstrap.Client.DataAccess.csproj | 2 +- Bootstrap.DataAccess/Bootstrap.DataAccess.csproj | 6 +++--- Bootstrap.DataAccess/Dict.cs | 2 -- Bootstrap.DataAccess/Helper/DictHelper.cs | 6 ------ 5 files changed, 5 insertions(+), 13 deletions(-) diff --git a/Bootstrap.Admin/Models/HeaderBarModel.cs b/Bootstrap.Admin/Models/HeaderBarModel.cs index ab3ff612..49cb1a8e 100644 --- a/Bootstrap.Admin/Models/HeaderBarModel.cs +++ b/Bootstrap.Admin/Models/HeaderBarModel.cs @@ -16,7 +16,7 @@ namespace Bootstrap.Admin.Models public HeaderBarModel(IIdentity identity) { var user = UserHelper.RetrieveUserByUserName(identity.Name); - Icon = Path.Combine(DictHelper.RetrieveIconFolderPath(), string.IsNullOrEmpty(user.Icon) ? DictHelper.RetrieveDefaultIcon() : user.Icon); + Icon = string.Format("{0}{1}", DictHelper.RetrieveIconFolderPath(), user.Icon); DisplayName = user.DisplayName; UserName = user.UserName; if (!string.IsNullOrEmpty(user.Css)) Theme = user.Css; diff --git a/Bootstrap.Client.DataAccess/Bootstrap.Client.DataAccess.csproj b/Bootstrap.Client.DataAccess/Bootstrap.Client.DataAccess.csproj index 36a904e4..3e6881c1 100644 --- a/Bootstrap.Client.DataAccess/Bootstrap.Client.DataAccess.csproj +++ b/Bootstrap.Client.DataAccess/Bootstrap.Client.DataAccess.csproj @@ -11,7 +11,7 @@ - + diff --git a/Bootstrap.DataAccess/Bootstrap.DataAccess.csproj b/Bootstrap.DataAccess/Bootstrap.DataAccess.csproj index 7119a9e9..83be9740 100644 --- a/Bootstrap.DataAccess/Bootstrap.DataAccess.csproj +++ b/Bootstrap.DataAccess/Bootstrap.DataAccess.csproj @@ -11,12 +11,12 @@ - - + + - + diff --git a/Bootstrap.DataAccess/Dict.cs b/Bootstrap.DataAccess/Dict.cs index 29049f2e..b7e56bbc 100644 --- a/Bootstrap.DataAccess/Dict.cs +++ b/Bootstrap.DataAccess/Dict.cs @@ -99,8 +99,6 @@ namespace Bootstrap.DataAccess /// public virtual string RetrieveHomeUrl() => (DictHelper.RetrieveDicts().FirstOrDefault(d => d.Name == "前台首页" && d.Category == "网站设置" && d.Define == 0) ?? new BootstrapDict() { Code = "~/Home/Index" }).Code; - public virtual string RetrieveDefaultIcon() => (DictHelper.RetrieveDicts().FirstOrDefault(d => d.Name == "头像文件" && d.Category == "头像地址" && d.Define == 0) ?? new BootstrapDict() { Code = "default.jpg" }).Code; - /// /// /// diff --git a/Bootstrap.DataAccess/Helper/DictHelper.cs b/Bootstrap.DataAccess/Helper/DictHelper.cs index 4a732939..8e6c3dd5 100644 --- a/Bootstrap.DataAccess/Helper/DictHelper.cs +++ b/Bootstrap.DataAccess/Helper/DictHelper.cs @@ -109,12 +109,6 @@ namespace Bootstrap.DataAccess /// public static string RetrieveHomeUrl() => DbContextManager.Create().RetrieveHomeUrl(); - /// - /// 获得默认的前台首页地址,默认为~/Home/Index - /// - /// - public static string RetrieveDefaultIcon() => DbContextManager.Create().RetrieveDefaultIcon(); - /// /// ///