Пример #1
0
        public IActionResult Index(string SysCmsInfoId, string SysCmsColumnId)
        {
            ViewBag.SysCmsInfoId   = SysCmsInfoId;
            ViewBag.SysCmsColumnId = SysCmsColumnId;

            ViewBag.SysCmsColumnSelect = _SysCmsColumnService.GetColumnList();
            ViewBag.SysCmsInfoSelect   = _SysCmsInfoService.GetInfoList();
            return(View());
        }
Пример #2
0
        /// <summary>
        /// 文章列表
        /// </summary>
        /// <returns></returns>
        public async Task <IActionResult> Article(string id = "")
        {
            ViewBag.id = id;
            //点击排行取10条
            var InfoTopCliks = await _unitOfWork.SysCmsInfoRepository.GetInfoPageAsync("", "", "2", "1", $"-{nameof(SysCmsInfo.InfoClicks)}", 1, 10);

            ViewBag.InfoTopCliks = InfoTopCliks;

            //评论排行取10条
            var InfoTopComents = await _unitOfWork.SysCmsInfoRepository.GetInfoPageAsync("", "", "2", "1", $"-{nameof(SysCmsInfo.InfoComments)}", 1, 10);

            ViewBag.InfoTopComents = InfoTopComents;

            ViewBag.SysCmsColumnSelect = _SysCmsColumnService.GetColumnList("87cb34a9bb084d229f137d4f09b2d742");//分类导航

            return(View());
        }
Пример #3
0
        public IActionResult Form(string id)
        {
            ViewBag.id       = id;
            ViewBag.isCreate = string.IsNullOrEmpty(id);
            var model = _unitOfWork.SysCmsColumnRepository.Get(id);

            ViewBag.SysCmsColumnParentSelect = _SysCmsColumnService.GetColumnList();
            return(View(model ?? new SysCmsColumn()
            {
                Status = 1
            }));
        }