Authored by 周少峰

index and channelpager

@@ -94,7 +94,7 @@ exports.getOutletsIndexData = (params, channel) => { @@ -94,7 +94,7 @@ exports.getOutletsIndexData = (params, channel) => {
94 } 94 }
95 } 95 }
96 96
97 - finalResult.pager = publicHandler.handleSalePagerData(result[5].data.total, params); 97 + finalResult.goodsBoard.pager = publicHandler.handleSalePagerData(result[5].data.total, params);
98 } 98 }
99 99
100 // 处理即将上架品牌数据 100 // 处理即将上架品牌数据
@@ -148,6 +148,7 @@ exports.getOutletsChannelData = (params, channel) => { @@ -148,6 +148,7 @@ exports.getOutletsChannelData = (params, channel) => {
148 }; 148 };
149 149
150 Object.assign(channelData, finalResult); 150 Object.assign(channelData, finalResult);
  151 +
151 // 资源楼层 152 // 资源楼层
152 if (result[1].code === 200) { 153 if (result[1].code === 200) {
153 Object.assign(channelData, outletsProcess.processFloor(result[1].data.list, params)); 154 Object.assign(channelData, outletsProcess.processFloor(result[1].data.list, params));
@@ -164,7 +165,7 @@ exports.getOutletsChannelData = (params, channel) => { @@ -164,7 +165,7 @@ exports.getOutletsChannelData = (params, channel) => {
164 channelData.goodsBoard.sort = publicHandler.handleSaleOptsData(params, result[3].data.total); 165 channelData.goodsBoard.sort = publicHandler.handleSaleOptsData(params, result[3].data.total);
165 channelData.goodsBoard.sort.newPage = true; 166 channelData.goodsBoard.sort.newPage = true;
166 channelData.goodsBoard.list = productProcess.processProductList(result[3].data.product_list); 167 channelData.goodsBoard.list = productProcess.processProductList(result[3].data.product_list);
167 - channelData.pager = publicHandler.handleSalePagerData(result[3].data.total, params); 168 + channelData.goodsBoard.pager = publicHandler.handleSalePagerData(result[3].data.total, params);
168 169
169 // 添加锚点 170 // 添加锚点
170 if (channelData.goodsBoard.sort.sortType) { 171 if (channelData.goodsBoard.sort.sortType) {
@@ -355,6 +355,9 @@ exports.handleSaleOptsData = (params, total, extra) => { @@ -355,6 +355,9 @@ exports.handleSaleOptsData = (params, total, extra) => {
355 dest.preHref = handleFilterUrl(params, {page: preHref}); 355 dest.preHref = handleFilterUrl(params, {page: preHref});
356 } 356 }
357 357
  358 + // 全部商品数
  359 + dest.totalCount = total;
  360 +
358 // 商品开始结束数 361 // 商品开始结束数
359 dest.start = (!_.isEmpty(params.page) ? (params.page - 1) : 0) * paramsLimit + 1; 362 dest.start = (!_.isEmpty(params.page) ? (params.page - 1) : 0) * paramsLimit + 1;
360 dest.end = (dest.pageCount === parseInt(params.page, 10)) ? 363 dest.end = (dest.pageCount === parseInt(params.page, 10)) ?
@@ -26,7 +26,7 @@ @@ -26,7 +26,7 @@
26 </div> 26 </div>
27 </div> 27 </div>
28 <div class="product-pager clearfix"> 28 <div class="product-pager clearfix">
29 - <span class="total">{{{total}}}</span> 29 + <span class="total">{{sort.start}} - {{sort.end}} / 共{{sort.totalCount}}件商品</span>
30 <div class="pager">{{{pager}}}</div> 30 <div class="pager">{{{pager}}}</div>
31 </div> 31 </div>
32 {{/ goodsBoard}} 32 {{/ goodsBoard}}