diff --git a/src/blazor/admin/BootstrapAdmin.DataAccess.PetaPoco/Services/DictService.cs b/src/blazor/admin/BootstrapAdmin.DataAccess.PetaPoco/Services/DictService.cs
index 4a1ced77..e6c0548b 100644
--- a/src/blazor/admin/BootstrapAdmin.DataAccess.PetaPoco/Services/DictService.cs
+++ b/src/blazor/admin/BootstrapAdmin.DataAccess.PetaPoco/Services/DictService.cs
@@ -152,4 +152,22 @@ class DictService : BaseDatabase, IDict
public bool SaveWebFooter(string footer) => SaveDict(new Dict { Category = "网站设置", Name = "网站页脚", Code = footer });
public bool SaveCookieExpiresPeriod(int expiresPeriod) => SaveDict(new Dict { Category = "网站设置", Name = "Cookie保留时长", Code = expiresPeriod.ToString() });
+
+ public string? GetProfileUrl(string appId) => GetUrlByName(appId, "个人中心地址");
+
+ public string? GetSettingsUrl(string appId) => GetUrlByName(appId, "系统设置地址");
+
+ public string? GetNotificationUrl(string appId) => GetUrlByName(appId, "系统通知地址");
+
+ private string? GetUrlByName(string appId, string dictName)
+ {
+ string? url = null;
+ var dicts = GetAll();
+ var appName = dicts.FirstOrDefault(d => d.Category == "应用程序" && d.Code == appId && d.Define == EnumDictDefine.System)?.Name;
+ if (!string.IsNullOrEmpty(appName))
+ {
+ url = dicts.FirstOrDefault(d => d.Category == appName && d.Name == dictName && d.Define == EnumDictDefine.Customer)?.Code;
+ }
+ return url;
+ }
}
diff --git a/src/blazor/admin/BootstrapAdmin.Web.Core/IDict.cs b/src/blazor/admin/BootstrapAdmin.Web.Core/IDict.cs
index 35cbb693..31ed886e 100644
--- a/src/blazor/admin/BootstrapAdmin.Web.Core/IDict.cs
+++ b/src/blazor/admin/BootstrapAdmin.Web.Core/IDict.cs
@@ -111,5 +111,11 @@ namespace BootstrapAdmin.Web.Core
///
///
bool SaveCookieExpiresPeriod(int expiresPeriod);
+
+ string? GetProfileUrl(string appId);
+
+ string? GetSettingsUrl(string appId);
+
+ string? GetNotificationUrl(string appId);
}
}
diff --git a/src/blazor/client/BootstrapClient.Shared/Shared/MainLayout.razor b/src/blazor/client/BootstrapClient.Shared/Shared/MainLayout.razor
index 1915e5d3..1c841bb2 100644
--- a/src/blazor/client/BootstrapClient.Shared/Shared/MainLayout.razor
+++ b/src/blazor/client/BootstrapClient.Shared/Shared/MainLayout.razor
@@ -8,8 +8,14 @@
Bootstrap of Blazor
-
- @DisplayName
+
+
+ 个人中心
+ 设置
+ 通知
+ 注销
+
+
IsOpen = !IsOpen)">
diff --git a/src/blazor/client/BootstrapClient.Shared/Shared/MainLayout.razor.cs b/src/blazor/client/BootstrapClient.Shared/Shared/MainLayout.razor.cs
index 2cf2f6c3..71edb1cf 100644
--- a/src/blazor/client/BootstrapClient.Shared/Shared/MainLayout.razor.cs
+++ b/src/blazor/client/BootstrapClient.Shared/Shared/MainLayout.razor.cs
@@ -5,6 +5,7 @@ using BootstrapClient.Web.Shared.Extensions;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Authorization;
+using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Options;
namespace BootstrapClient.Web.Shared.Shared
@@ -30,6 +31,12 @@ namespace BootstrapClient.Web.Shared.Shared
private IEnumerable