public ActionResult ChannelList(string alias) { //根据别名获得技术分类详细信息 var techModel = TechService.GetTechInfoByAlias(alias); if (techModel.Id == 0 || techModel.IsDeleted) { return(Content("Argument error.")); } //获得栏目ID int catId = CECRequest.GetQueryInt("catid", 0); var catInfo = ColumnService.GetById(catId); int pageIndex = CECRequest.GetQueryInt("page", 1); var articleList = ArticleService.List(new Models.ArticleSearchSetting() { PageIndex = pageIndex, ColumnIds = new int[] { catId }, TechIds = new int[] { techModel.Id }, IsDeleted = false }); ViewBag.TechInfo = techModel; ViewBag.ColumnInfo = catInfo; ViewBag.ArticleList = articleList; return(View()); }
public ActionResult ChannelIndex(string alias) { //根据别名获得技术分类详细信息 var techModel = TechService.GetTechInfoByAlias(alias); if (techModel.Id == 0 || techModel.IsDeleted) { return(Content("Argument error.")); } ViewBag.TechInfo = techModel; return(View()); }