You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
1.5 KiB
64 lines
1.5 KiB
using learun.util;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using System.Threading.Tasks;
|
|
|
|
// For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
|
|
|
|
namespace EC.Web.Areas.LR_Desktop.Controllers
|
|
{
|
|
/// <summary>
|
|
/// 版 本 EasyCode EC管理后台
|
|
/// Copyright (c) 2019-present EC管理有限公司
|
|
/// 创建人:tobin
|
|
/// 日 期:2019.10.31
|
|
/// 描 述:桌面配置
|
|
/// </summary>
|
|
[Area("LR_Desktop")]
|
|
public class DTSettingController : MvcControllerBase
|
|
{
|
|
#region 视图功能
|
|
|
|
/// <summary>
|
|
/// 移动端桌面配置(和pc桌面采用一套数据)
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public IActionResult AppIndex()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
/// <summary>
|
|
/// pc端桌面设置
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public async Task<IActionResult> PcIndex()
|
|
{
|
|
var userInfo = await this.CurrentUser();
|
|
string uItheme = userInfo.F_HeadIcon;
|
|
string[] uIthemeList = ConfigHelper.GetConfig().UItheme.Split(",");
|
|
bool findFlag = false;
|
|
foreach (var item in uIthemeList)
|
|
{
|
|
findFlag |= item == uItheme;
|
|
}
|
|
|
|
if (!findFlag)
|
|
{
|
|
uItheme = "default";
|
|
}
|
|
|
|
return uItheme switch
|
|
{
|
|
"default" => View("DefaultIndex"), // 经典版本
|
|
"accordion" => View("AccordionIndex"), // 手风琴版本
|
|
"windows" => View("WindowsIndex"), // Windos版本
|
|
"top" => View("TopIndex"), // 顶部菜单版本
|
|
_ => View("DefaultIndex"), // 经典版本
|
|
};
|
|
}
|
|
|
|
#endregion 视图功能
|
|
}
|
|
}
|