Authored by 周少峰

index and channelpager

... ... @@ -94,7 +94,7 @@ exports.getOutletsIndexData = (params, channel) => {
}
}
finalResult.pager = publicHandler.handleSalePagerData(result[5].data.total, params);
finalResult.goodsBoard.pager = publicHandler.handleSalePagerData(result[5].data.total, params);
}
// 处理即将上架品牌数据
... ... @@ -148,6 +148,7 @@ exports.getOutletsChannelData = (params, channel) => {
};
Object.assign(channelData, finalResult);
// 资源楼层
if (result[1].code === 200) {
Object.assign(channelData, outletsProcess.processFloor(result[1].data.list, params));
... ... @@ -164,7 +165,7 @@ exports.getOutletsChannelData = (params, channel) => {
channelData.goodsBoard.sort = publicHandler.handleSaleOptsData(params, result[3].data.total);
channelData.goodsBoard.sort.newPage = true;
channelData.goodsBoard.list = productProcess.processProductList(result[3].data.product_list);
channelData.pager = publicHandler.handleSalePagerData(result[3].data.total, params);
channelData.goodsBoard.pager = publicHandler.handleSalePagerData(result[3].data.total, params);
// 添加锚点
if (channelData.goodsBoard.sort.sortType) {
... ...
... ... @@ -355,6 +355,9 @@ exports.handleSaleOptsData = (params, total, extra) => {
dest.preHref = handleFilterUrl(params, {page: preHref});
}
// 全部商品数
dest.totalCount = total;
// 商品开始结束数
dest.start = (!_.isEmpty(params.page) ? (params.page - 1) : 0) * paramsLimit + 1;
dest.end = (dest.pageCount === parseInt(params.page, 10)) ?
... ...
... ... @@ -26,7 +26,7 @@
</div>
</div>
<div class="product-pager clearfix">
<span class="total">{{{total}}}</span>
<span class="total">{{sort.start}} - {{sort.end}} / 共{{sort.totalCount}}件商品</span>
<div class="pager">{{{pager}}}</div>
</div>
{{/ goodsBoard}}
\ No newline at end of file
... ...