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 { /// /// 版 本 EasyCode EC管理后台 /// Copyright (c) 2019-present EC管理有限公司 /// 创建人:tobin /// 日 期:2019.10.31 /// 描 述:桌面配置 /// [Area("LR_Desktop")] public class DTSettingController : MvcControllerBase { #region 视图功能 /// /// 移动端桌面配置(和pc桌面采用一套数据) /// /// [HttpGet] public IActionResult AppIndex() { return View(); } /// /// pc端桌面设置 /// /// [HttpGet] public async Task 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 视图功能 } }