Authored by 郭成尧

'分页页码页数'

... ... @@ -97,7 +97,8 @@ exports.getOutletsIndexData = (params, channel) => {
}
}
finalResult.goodsBoard.pager = publicHandler.handleSalePagerData(result[5].data.total, params);
// finalResult.goodsBoard.pager = publicHandler.handleSalePagerData(result[5].data.total, params);
finalResult.goodsBoard.footPager = publicHandler.handlePagerData(result[5].data.total, params);
}
// 处理即将上架品牌数据
... ...
... ... @@ -23,7 +23,7 @@ const handleFilterUrl = (originParam, newParam) => {
tempOriginParam = Object.assign(tempOriginParam, originParam, newParam);
_.forEach(tempOriginParam, function(value, key) {
_.forEach(tempOriginParam, function (value, key) {
dest = dest + key + '=' + value + '&';
});
... ... @@ -66,8 +66,8 @@ const handleSalebreakingYardsSortData = (origin, params) => {
// 判断是否在这组数据里面
if (!_.isEmpty(_.find(value.sort_id.split(','), o => {
return o === sortParam;
}))) {
return o === sortParam;
}))) {
// 如果在某组数据里面,组合数据退出循环
_.forEach(value.sub, subValue => {
... ... @@ -152,8 +152,8 @@ const handleBrandCheckedData = (params, origin) => {
if (!_.isEmpty(origin)) {
_.forEach(origin, (value) => {
if (typeof _.find(intBrands, o => {
return _.isEqual(o, value.id);
}) !== 'undefined') {
return _.isEqual(o, value.id);
}) !== 'undefined') {
let checked = {
name: value.name
... ... @@ -543,7 +543,7 @@ exports.handleSaleFilterData = (origin, params) => {
if (!_.isEmpty(origin.brand)) {
let count = 0;
_.forEach(origin.brand, function(value) {
_.forEach(origin.brand, function (value) {
let brand = {
checked: (typeof _.find(intBrands, o => {
return _.isEqual(o, value.id);
... ... @@ -678,7 +678,7 @@ exports.handleBannerData = (origin) => {
let dest = {};
dest.list = [];
_.forEach(origin, function(value) {
_.forEach(origin, function (value) {
if (value.template_name === 'focus') {
_.forEach(value.data, subValue => {
... ... @@ -826,6 +826,13 @@ 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
};
dest.pages = _.concat(prevPages, pages, nextPages);
... ...
{{# footPager}}
<div class="product-pager clearfix">
<span class="total">{{tip}}</span>
<div class="foot-pager clearfix">
<span class="total">
{{# tip}}
{{#if totalText}}
{{totalText}}
{{^}}
{{start}} - {{end}} / 共{{total}}件商品
{{/if}}
{{/ tip}}
</span>
<div class="pager">
{{# prePage}}
... ...