feat: 增加网站设置读取方法

This commit is contained in:
Argo Zhang 2019-08-17 16:24:28 +08:00
parent f7a3100777
commit 2da783dda3
No known key found for this signature in database
GPG Key ID: 152E398953DDF19F
2 changed files with 12 additions and 0 deletions

View File

@ -186,5 +186,11 @@ namespace Bootstrap.DataAccess
/// </summary>
/// <returns></returns>
public string RetrieveImagesLibUrl() => DictHelper.RetrieveDicts().FirstOrDefault(d => d.Category == "系统设置" && d.Name == "验证码图床" && d.Define == 0)?.Code ?? "http://images.sdgxgz.com/";
/// <summary>
/// 获得 数据库标题是否显示
/// </summary>
/// <returns></returns>
public bool RetrieveCardTitleStatus() => (DictHelper.RetrieveDicts().FirstOrDefault(d => d.Category == "网站设置" && d.Name == "卡片标题状态" && d.Define == 0)?.Code ?? "") == "1";
}
}

View File

@ -202,5 +202,11 @@ namespace Bootstrap.DataAccess
/// </summary>
/// <returns></returns>
public static string RetrieveImagesLibUrl() => DbContextManager.Create<Dict>().RetrieveImagesLibUrl();
/// <summary>
/// 获得数据区卡片标题是否显示
/// </summary>
/// <returns></returns>
public static bool RetrieveCardTitleStatus() => DbContextManager.Create<Dict>().RetrieveCardTitleStatus();
}
}