diff --git a/src/admin/Bootstrap.Admin/Models/SettingsModel.cs b/src/admin/Bootstrap.Admin/Models/SettingsModel.cs index 938c195d..b5b9fc03 100644 --- a/src/admin/Bootstrap.Admin/Models/SettingsModel.cs +++ b/src/admin/Bootstrap.Admin/Models/SettingsModel.cs @@ -28,6 +28,7 @@ namespace Bootstrap.Admin.Models CookiePeriod = DictHelper.RetrieveCookieExpiresPeriod(); IPCachePeriod = DictHelper.RetrieveLocaleIPSvrCachePeriod(); EnableDemo = DictHelper.RetrieveSystemModel(); + AdminPathBase = DictHelper.RetrievePathBase(); } /// @@ -89,5 +90,10 @@ namespace Bootstrap.Admin.Models /// 获得/设置 是否为演示系统 /// public bool EnableDemo { get; set; } + + /// + /// 获得/设置 后台管理网站地址 + /// + public string AdminPathBase { get; set; } = ""; } } diff --git a/src/admin/Bootstrap.Admin/Views/Admin/Settings.cshtml b/src/admin/Bootstrap.Admin/Views/Admin/Settings.cshtml index 07993243..8b416505 100644 --- a/src/admin/Bootstrap.Admin/Views/Admin/Settings.cshtml +++ b/src/admin/Bootstrap.Admin/Views/Admin/Settings.cshtml @@ -26,10 +26,10 @@ }
-
系统名称设置
-
+
网站名称设置
+
@@ -42,10 +42,10 @@
-
页脚设置
-
+
网站页脚设置
+
@@ -57,6 +57,22 @@
+
+
后台管理地址设置
+
+ +
+
+ +
+ +
+
+
+
+
网站样式
diff --git a/src/admin/Bootstrap.Admin/wwwroot/js/settings.js b/src/admin/Bootstrap.Admin/wwwroot/js/settings.js index b1110fa9..19bcd9fc 100644 --- a/src/admin/Bootstrap.Admin/wwwroot/js/settings.js +++ b/src/admin/Bootstrap.Admin/wwwroot/js/settings.js @@ -140,6 +140,12 @@ $(function () { } }); break; + case 'appPath': + var appPath = $('#sysAppPath').val(); + $.bc({ + url: Settings.url, data: [{ name: 'AppPath', code: appPath }], title: '后台管理地址设置', method: "post" + }); + break; } }); diff --git a/src/admin/Bootstrap.DataAccess/Dict.cs b/src/admin/Bootstrap.DataAccess/Dict.cs index ea0ffc47..3f4fde73 100644 --- a/src/admin/Bootstrap.DataAccess/Dict.cs +++ b/src/admin/Bootstrap.DataAccess/Dict.cs @@ -313,5 +313,11 @@ namespace Bootstrap.DataAccess /// /// public IEnumerable RetireveLocators() => DictHelper.RetrieveDicts().Where(d => d.Category == "地理位置服务"); + + /// + /// 获得个人中心地址 + /// + /// + public string RetrievePathBase() => DictHelper.RetrieveDicts().FirstOrDefault(d => d.Category == "网站设置" && d.Name == "后台地址" && d.Define == 0)?.Code ?? ""; } } diff --git a/src/admin/Bootstrap.DataAccess/Helper/DictHelper.cs b/src/admin/Bootstrap.DataAccess/Helper/DictHelper.cs index b681b4d4..8a9269a4 100644 --- a/src/admin/Bootstrap.DataAccess/Helper/DictHelper.cs +++ b/src/admin/Bootstrap.DataAccess/Helper/DictHelper.cs @@ -142,7 +142,8 @@ namespace Bootstrap.DataAccess ["LogLog"] = "登录日志保留时长", ["TraceLog"] = "访问日志保留时长", ["CookiePeriod"] = "Cookie保留时长", - ["IPCachePeriod"] = "IP请求缓存时长" + ["IPCachePeriod"] = "IP请求缓存时长", + ["AppPath"] = "后台地址" }; var ret = SaveSettings(items.Where(i => cache.Any(c => c.Key == i.Name)).Select(i => new BootstrapDict() { @@ -340,5 +341,11 @@ namespace Bootstrap.DataAccess /// /// public static IEnumerable RetireveLocators() => DbContextManager.Create()?.RetireveLocators() ?? new BootstrapDict[0]; + + /// + /// 获得个人中心地址 + /// + /// + public static string RetrievePathBase() => DbContextManager.Create()?.RetrievePathBase() ?? ""; } }