QueryParams: function (params) {
Var tem={
PageNumber: (params. Offset/params. Limit) + 1,
PageSize: params. Limit
}
Return tem;
}
What is the meaning of this writing, ask bosses explanation, thank you very much!!!!!!
CodePudding user response:
Params. Article should offset from a database which began, params. Limit how many article, each page (params. Offset/params. Limit) + 1, how many pages, such as starting from 0, five data query, pageNumber: (params. Offset/params. Limit) + 1, pageNumber: (0/5) + 1, this is the first page