fix(#I1C06B): 网站设置后台网站标题与页脚
#Comment comment #I1C06B #Issue close https://gitee.com/LongbowEnterprise/dashboard?issue_id=I1C06B
This commit is contained in:
parent
635e3cdcb7
commit
8c076f95bd
|
@ -1,5 +1,6 @@
|
|||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.Security;
|
||||
using Bootstrap.Security.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
@ -43,6 +44,12 @@ namespace Bootstrap.Admin.Models
|
|||
var url = dicts.FirstOrDefault(d => d.Category == "应用首页" && d.Name == k.Key && d.Define == 0)?.Code ?? "未设置";
|
||||
return (k.Key, k.Value, url);
|
||||
});
|
||||
|
||||
// 实际后台网站名称
|
||||
WebSiteTitle = DictHelper.RetrieveWebTitle(BootstrapAppContext.AppId);
|
||||
|
||||
// 实际后台网站页脚
|
||||
WebSiteFooter = DictHelper.RetrieveWebFooter(BootstrapAppContext.AppId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -129,5 +136,15 @@ namespace Bootstrap.Admin.Models
|
|||
/// 获得/设置 登录视图名称 默认是 Login
|
||||
/// </summary>
|
||||
public KeyValuePair<string, string> LoginView { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获得/设置 实际 BA 后台网站名称
|
||||
/// </summary>
|
||||
public string WebSiteTitle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获得/设置 实际 BA 后台网站页脚
|
||||
/// </summary>
|
||||
public string WebSiteFooter { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
using Bootstrap.Admin.Pages.Shared;
|
||||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.Security;
|
||||
using Bootstrap.Security.Mvc;
|
||||
using Longbow.Cache;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.JSInterop;
|
||||
|
@ -60,8 +61,8 @@ namespace Bootstrap.Admin.Pages.Views.Admin.Components
|
|||
/// </summary>
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
Model.Title = RootLayout?.Model.Title ?? "";
|
||||
Model.Footer = RootLayout?.Model.Footer ?? "";
|
||||
Model.Title = DictHelper.RetrieveWebTitle(BootstrapAppContext.AppId);
|
||||
Model.Footer = DictHelper.RetrieveWebFooter(BootstrapAppContext.AppId);
|
||||
Model.Theme = RootLayout?.Model.Theme ?? "";
|
||||
Model.ShowSideBar = DictHelper.RetrieveSidebarStatus();
|
||||
Model.ShowCardTitle = DictHelper.RetrieveCardTitleStatus();
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" id="sysName" placeholder="请输入网站标题,50字以内" value="@Model.Title" maxlength="50" data-valid="true" />
|
||||
<input type="text" class="form-control" id="sysName" placeholder="请输入网站标题,50字以内" value="@Model.WebSiteTitle" maxlength="50" data-valid="true" />
|
||||
<div class="input-group-append" asp-condition="!@Model.IsDemo">
|
||||
<button class="btn btn-secondary" type="button" data-method="title">保存</button>
|
||||
</div>
|
||||
|
@ -49,7 +49,7 @@
|
|||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" id="sysFoot" placeholder="请输入网站页脚,50字以内" value="@Model.Footer" maxlength="50" data-valid="true" />
|
||||
<input type="text" class="form-control" id="sysFoot" placeholder="请输入网站页脚,50字以内" value="@Model.WebSiteFooter" maxlength="50" data-valid="true" />
|
||||
<div class="input-group-append" asp-condition="!@Model.IsDemo">
|
||||
<button class="btn btn-secondary" type="button" data-method="footer">保存</button>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue