修复json序列化配置忽略属性的问题

This commit is contained in:
xxred
2019-03-29 22:22:00 +08:00
parent 89d9e04764
commit f974b22d65
3 changed files with 12 additions and 97 deletions
@@ -276,8 +276,8 @@ namespace COMCMS.Web.Areas.AdminCP.Controllers
IList<Article> list = Article.FindAll(ex, Article._.Sequence.Asc().And(Article._.Id.Desc()), null, startRowIndex, numPerPage);
long totalCount = Article.FindCount(ex, Article._.Sequence.Asc().And(Article._.Id.Desc()), null, startRowIndex, numPerPage);
return Content(Newtonsoft.Json.JsonConvert.SerializeObject(new { total = totalCount, rows = list }), "text/plain");
//return Json(new { total = totalCount, rows = list }, JsonRequestBehavior.AllowGet);
//return Content(Newtonsoft.Json.JsonConvert.SerializeObject(new { total = totalCount, rows = list }), "text/plain");
return Json(new { total = totalCount, rows = list });
}
//添加文章