//我的日记
        // GET: Article
        public ActionResult Index(string keyboard)
        {
            List <UIData> list = HomeService.GetArticlesList("文章", keyboard);
            //分类和文章个数
            List <Classify> classList = HomeService.GetClassifyList();
            //推荐文章
            List <Articles> recomList = RecomService.GetRecomList();
            //点击量最多的前8条
            List <Articles> topList = HomeService.GetTopEight();
            //获取所有标签
            List <string> tagList = HomeService.getTagList();

            ViewBag.A = list;
            ViewBag.B = classList;
            ViewBag.C = recomList;
            ViewBag.D = topList;
            ViewBag.E = tagList;
            return(View());
        }
Example #2
0
        // GET: Home文章列表页面
        public ActionResult Index(string keyboard)
        {   //文章列表
            List <UIData> list = HomeService.GetArticlesList("", keyboard);
            //个人信息
            User user = AboutService.getUser();
            //6张照片
            List <Photos> photos = PhotosService.GetPhotos();
            //分类和文章个数
            List <Classify> classList = HomeService.GetClassifyList();
            //推荐文章
            List <Articles> recomList = RecomService.GetRecomList();

            ViewBag.A = list;
            ViewBag.B = user;
            ViewBag.C = photos;
            ViewBag.D = classList;
            ViewBag.E = recomList;
            return(View(list));
        }