public Prompt <object> GetList(NewLife.Data.PageParameter p, string token = null) { if (token.IsNullOrEmpty()) { return(new Prompt { Status = 0, Message = "Token不存在" }); } if (token != "123456") { return(new Prompt { Status = 0, Message = "Token不存在" }); } var list = Bill.Search(null, p); var result = PageResult.FromPager(p); result.Data = list; return(result); }
/// <summary>从后端分页器转换</summary> /// <param name="p"></param> /// <returns></returns> public static PageResult <T> FromPager(NewLife.Data.PageParameter p) { return(new PageResult <T> { PageIndex = p.PageIndex, PageSize = p.PageSize, TotalCount = p.TotalCount, PageCount = p.PageCount }); }