|
@@ -23,7 +23,7 @@ const handleFilterUrl = (originParam, newParam) => { |
|
@@ -23,7 +23,7 @@ const handleFilterUrl = (originParam, newParam) => { |
23
|
|
23
|
|
24
|
tempOriginParam = Object.assign(tempOriginParam, originParam, newParam);
|
24
|
tempOriginParam = Object.assign(tempOriginParam, originParam, newParam);
|
25
|
|
25
|
|
26
|
- _.forEach(tempOriginParam, function(value, key) {
|
26
|
+ _.forEach(tempOriginParam, function (value, key) {
|
27
|
dest = dest + key + '=' + value + '&';
|
27
|
dest = dest + key + '=' + value + '&';
|
28
|
});
|
28
|
});
|
29
|
|
29
|
|
|
@@ -66,8 +66,8 @@ const handleSalebreakingYardsSortData = (origin, params) => { |
|
@@ -66,8 +66,8 @@ const handleSalebreakingYardsSortData = (origin, params) => { |
66
|
|
66
|
|
67
|
// 判断是否在这组数据里面
|
67
|
// 判断是否在这组数据里面
|
68
|
if (!_.isEmpty(_.find(value.sort_id.split(','), o => {
|
68
|
if (!_.isEmpty(_.find(value.sort_id.split(','), o => {
|
69
|
- return o === sortParam;
|
|
|
70
|
- }))) {
|
69
|
+ return o === sortParam;
|
|
|
70
|
+ }))) {
|
71
|
|
71
|
|
72
|
// 如果在某组数据里面,组合数据退出循环
|
72
|
// 如果在某组数据里面,组合数据退出循环
|
73
|
_.forEach(value.sub, subValue => {
|
73
|
_.forEach(value.sub, subValue => {
|
|
@@ -152,8 +152,8 @@ const handleBrandCheckedData = (params, origin) => { |
|
@@ -152,8 +152,8 @@ const handleBrandCheckedData = (params, origin) => { |
152
|
if (!_.isEmpty(origin)) {
|
152
|
if (!_.isEmpty(origin)) {
|
153
|
_.forEach(origin, (value) => {
|
153
|
_.forEach(origin, (value) => {
|
154
|
if (typeof _.find(intBrands, o => {
|
154
|
if (typeof _.find(intBrands, o => {
|
155
|
- return _.isEqual(o, value.id);
|
|
|
156
|
- }) !== 'undefined') {
|
155
|
+ return _.isEqual(o, value.id);
|
|
|
156
|
+ }) !== 'undefined') {
|
157
|
|
157
|
|
158
|
let checked = {
|
158
|
let checked = {
|
159
|
name: value.name
|
159
|
name: value.name
|
|
@@ -543,7 +543,7 @@ exports.handleSaleFilterData = (origin, params) => { |
|
@@ -543,7 +543,7 @@ exports.handleSaleFilterData = (origin, params) => { |
543
|
if (!_.isEmpty(origin.brand)) {
|
543
|
if (!_.isEmpty(origin.brand)) {
|
544
|
let count = 0;
|
544
|
let count = 0;
|
545
|
|
545
|
|
546
|
- _.forEach(origin.brand, function(value) {
|
546
|
+ _.forEach(origin.brand, function (value) {
|
547
|
let brand = {
|
547
|
let brand = {
|
548
|
checked: (typeof _.find(intBrands, o => {
|
548
|
checked: (typeof _.find(intBrands, o => {
|
549
|
return _.isEqual(o, value.id);
|
549
|
return _.isEqual(o, value.id);
|
|
@@ -678,7 +678,7 @@ exports.handleBannerData = (origin) => { |
|
@@ -678,7 +678,7 @@ exports.handleBannerData = (origin) => { |
678
|
let dest = {};
|
678
|
let dest = {};
|
679
|
|
679
|
|
680
|
dest.list = [];
|
680
|
dest.list = [];
|
681
|
- _.forEach(origin, function(value) {
|
681
|
+ _.forEach(origin, function (value) {
|
682
|
if (value.template_name === 'focus') {
|
682
|
if (value.template_name === 'focus') {
|
683
|
_.forEach(value.data, subValue => {
|
683
|
_.forEach(value.data, subValue => {
|
684
|
|
684
|
|
|
@@ -826,6 +826,13 @@ exports.handlePagerData = (total, params) => { |
|
@@ -826,6 +826,13 @@ exports.handlePagerData = (total, params) => { |
826
|
});
|
826
|
});
|
827
|
}
|
827
|
}
|
828
|
}
|
828
|
}
|
|
|
829
|
+ // 商品开始结束数
|
|
|
830
|
+ dest.tip = {
|
|
|
831
|
+ total: total,
|
|
|
832
|
+ start: (currentPage ? currentPage - 1 : 0) * perPageCount + 1,
|
|
|
833
|
+ end: (total < perPageCount) ? total : (dest.pageCount === parseInt(params.page, 10)) ?
|
|
|
834
|
+ total : parseInt(dest.start, 10) + perPageCount - 1
|
|
|
835
|
+ };
|
829
|
|
836
|
|
830
|
dest.pages = _.concat(prevPages, pages, nextPages);
|
837
|
dest.pages = _.concat(prevPages, pages, nextPages);
|
831
|
|
838
|
|