public ActionResult Edit(int id) { var article = jlService.GetArticle(id); ArticleModel model = new ArticleModel(); model.AddTime = article.AddTime; model.Content = article.Content; model.Brief = article.Brief; model.Title = article.Title; model.Picture = article.Picture; model.IsPublished = article.Status == 0; return(View(model)); }
// skincare/1 public ActionResult Detail(int id) { var article = jlService.GetArticle(id); // 热门文章 var hotest = jlService.GetHotestArticle(10); var latest = jlService.GetLatestArticle(10); ViewBag.Hotest = hotest; ViewBag.Latest = latest; return(View(article)); }