using Microsoft.AspNetCore.Mvc.Rendering; using Nirvana.Common; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using YBDevice.Application.ViewInfo; using YBDevice.Entity; namespace YBDevice.NWeb.Pages.Banner { /// /// 轮播图、开屏广告管理 /// public class IndexModel : BaseModel { public List types = new List(); public List ptypes = new List(); public List statuss = new List(); private IViewEngineService _viewEngineService; public ViewS2SDto viewdata = new ViewS2SDto(); public IndexModel(IViewEngineService viewEngineService) { _viewEngineService = viewEngineService; } public async Task OnGetAsync() { statuss = EnumHelper.GetEnumDictionary().Select(x => new SelectListItem { Value = x.Key.ToString(), Text = x.Value }).ToList(); types = EnumHelper.GetEnumDictionary().Select(x => new SelectListItem { Value = x.Key.ToString(), Text = x.Value }).ToList(); ptypes = EnumHelper.GetEnumDictionary().Select(x => new SelectListItem { Value = x.Key.ToString(), Text = x.Value }).ToList(); viewdata = await _viewEngineService.GetBtnListAsync(); } } }