/// <summary> /// 新闻中心 /// Add by zhengsong /// Update By xiaofan /// </summary> /// <returns></returns> public ActionResult NewList(int categoryId) { if (_newService.GetArticleListByCategoryId(categoryId) == null) { throw new Exception("输入的参数有误"); } NewListModel model = new NewListModel(); model.ShowCategoryListModel = ShowCategoryListModel(); //获取当前类别列表信息 model.CategoryInfo = _newService.GetCategory(categoryId).ToModel <CategoryModel>(); model.GetArticleList = _newService.GetArticleListByCategoryId(categoryId).ToModelAsCollection <Article, ArticleModel>(); model.GetId = categoryId; return(View(model)); }