public HelpController(IHelpService helpService, ILinkService linkService)
 {
     _HelpService  = helpService;
     _ILinkService = linkService;
     helpDetails   = _HelpService.GetHelps(new HelpSearchView()
     {
         HelpCode = HelpCode.HelpCenter
     }, 1, 20).ToList();
 }
        public ActionResult GetGridJson(HelpSearchView searchView, int page = 1)
        {
            var data = _HelpService.GetHelps(searchView, page, PageSize);

            data.ForEach(da => {
                da.Description = RegexRegular.CheckMathLength(RegexRegular.NoHTML(da.Description), 20);
                //da.HelpCode = EnumCommon.GetDescription((HelpCode)da.HelpCode);
            });
            return(Content(new
            {
                rows = data,
                total = data.PageCount,
                page = data.PageIndex,
                records = data.TotalCount
            }.ToJson()));
        }
        //首页
        public IActionResult Index([FromServices] IArticleTopicService articleTopicService,
                                   [FromServices] IHelpService helpService, [FromServices] INewsService newsService
                                   , [FromServices] ILinkService linkService, [FromServices] IArticleCategoryService articleCategoryService)
        {
            ViewBag.TodayArticles = _ArticleService.GetTopArticles(ArticleTopEnum.HotArticle, 10);
            ViewBag.NewArticles   = _ArticleService.GetTopArticles(ArticleTopEnum.NewArticle, 10);

            ViewBag.HotTopics = articleTopicService.GetHotTopics(8);

            ViewBag.BestCates = articleCategoryService.GetCateList(new ArticleCateSearchView {
                IsRemmand = true
            }, 1, 6);

            var tradeScores = _IMemberScoreService.GetList(true, 5);

            ViewBag.TradeScores = tradeScores;
            //PPT
            ViewBag.HotPPT = _ArticleService.GetTopArticles(ArticleTopEnum.HotPPT, 18, null);
            ViewBag.NewPPT = _ArticleService.GetTopArticles(ArticleTopEnum.NewPPT, 18, null);

            //轮播图
            ViewBag.HomeCarousels = helpService.GetHelps(new HelpSearchView()
            {
                HelpCode = HelpCode.HomeCarousel
            }, 1, 10).ToList();
            //公告
            ViewBag.Announcements = newsService
                                    .GetTopNewss(NewsTopEnum.Announcement, 5).ToList();
            //资源总数量
            var totalData = _ArticleService.GetTotalBooks();

            ViewBag.TotalBooks = totalData;


            //友情链接
            ViewBag.FriendLinks = linkService.GetList();


            return(View());
        }