public ActionResult Getpage(string pagenum, string onepagecount) { PlatformResult com = new PlatformResult(); if (!Regex.IsMatch(pagenum, @"(?i)^[0-9a-z\u4e00-\u9fa5]+$") && !string.IsNullOrEmpty(pagenum)) { com.Msg = "页数不正确"; com.success = false; return(Json(com)); } if (!Regex.IsMatch(onepagecount, @"(?i)^[0-9a-z\u4e00-\u9fa5]+$") && !string.IsNullOrEmpty(onepagecount)) { com.Msg = "每页数量不正确"; com.success = false; return(Json(com)); } int totil = 0; int totilpage = 0; string exmsg = string.Empty; List <base_platform> mylist = _service.GetPlatformList(Convert.ToInt32(pagenum), Convert.ToInt32(onepagecount), out totil, out totilpage, out exmsg); if (!string.IsNullOrEmpty(exmsg)) { com.Msg = exmsg; com.success = false; return(Json(com)); } else { PlatformViewModel mylistview = new PlatformViewModel(); mylistview.supplist = mylist; mylistview.totil = totil.ToString(); mylistview.totilcount = totilpage.ToString(); com.DataResult = mylistview; com.success = true; return(Json(com)); } }