...
|
...
|
@@ -35,7 +35,17 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
resData.list = list;
|
|
|
}
|
|
|
|
|
|
Object.assign(resData, setPager(_.get(resList, 'data.total', 1), {page: page}));
|
|
|
let totalPage = _.get(resList, 'data.pageSize', 1);
|
|
|
|
|
|
if (+totalPage > 1) {
|
|
|
resData.pager = setPager(totalPage, {page: page});
|
|
|
|
|
|
Object.assign(resData.pager, {
|
|
|
count: _.get(resList, 'data.total', 0),
|
|
|
curPage: _.get(resList, 'data.currPage', 1),
|
|
|
totalPages: totalPage
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return resData;
|
...
|
...
|
|