Authored by yyq

分页小于两页不显示

... ... @@ -38,6 +38,11 @@ exports.setPager = (total, params)=>{
let pages = [];
let currentPage = parseInt(params.page || 1, 10); // 当前页
// 小于两页直接退出
if (total < 2) {
return resData;
}
for (i = currentPage - 2; i <= currentPage + 2; i++) {
if (i < 1) {
cutStatus = 1;
... ...