Authored by 郭成尧

'endPageNum'

... ... @@ -830,11 +830,12 @@ exports.handlePagerData = (total, params) => {
// 商品开始结束数
dest.tip = {
total: total,
start: (currentPage ? currentPage - 1 : 0) * perPageCount + 1,
end: (total < perPageCount) ? total : (dest.pageCount === parseInt(params.page, 10)) ?
total : parseInt(dest.start, 10) + perPageCount - 1
start: (currentPage ? currentPage - 1 : 0) * perPageCount + 1
};
dest.tip.end = (total < perPageCount) ? total : ((dest.pageCount === parseInt(params.page, 10)) ?
total : parseInt(dest.tip.start, 10) + perPageCount - 1);
dest.pages = _.concat(prevPages, pages, nextPages);
return dest;
... ...
... ... @@ -250,7 +250,7 @@ exports.getSaleOthersData = (params, channel) => {
// 处理排序数据
finalResult.opts = publicHandler.handleSaleOptsData(params, result[1].data.total);
finalResult.totalCount = result[1].data.total;
finalResult.pager = publicHandler.handleSalePagerData(result[1].data.total, params);
finalResult.footPager = publicHandler.handlePagerData(result[1].data.total, params);
// 处理所有商品标题数据
finalResult.saleTitle = {
... ... @@ -327,7 +327,7 @@ exports.getSaleDiscountData = (params, channel) => {
Object.assign(finalResult, {
leftContent: publicHandler.handleSaleSortData(result[1].data.filter.group_sort, params, 'discount'),
saleList: {
pager: publicHandler.handleSalePagerData(result[1].data.total, params),
footPager: publicHandler.handlePagerData(result[1].data.total, params),
opts: publicHandler.handleSaleOptsData(params, result[1].data.total)
}
});
... ... @@ -425,7 +425,7 @@ exports.getSalebreakingYardsData = (params, channel) => {
goods: productProcess.processProductList(subResult[1].data.product_list),
opts: publicHandler.handleSaleOptsData(params, subResult[1].data.total),
totalCount: subResult[1].data.total,
pager: publicHandler.handleSalePagerData(subResult[1].data.total, params)
footPager: publicHandler.handlePagerData(subResult[1].data.total, params)
});
// 处理所有商品标题数据
... ...