...
|
...
|
@@ -259,14 +259,14 @@ exports.handleOptsData = (params, total, extra) => { |
|
|
|
|
|
// 上下翻页数据处理
|
|
|
dest.pageCounts = [{
|
|
|
href: handleFilterUrl(params, {limit: 200}),
|
|
|
count: 200
|
|
|
href: handleFilterUrl(params, {limit: 60}),
|
|
|
count: 60
|
|
|
}, {
|
|
|
href: handleFilterUrl(params, {limit: 100}),
|
|
|
count: 100
|
|
|
}, {
|
|
|
href: handleFilterUrl(params, {limit: 60}),
|
|
|
count: 60
|
|
|
href: handleFilterUrl(params, {limit: 200}),
|
|
|
count: 200
|
|
|
}];
|
|
|
|
|
|
dest.curPage = _.isEmpty(params.page) ? 1 : params.page; // 当前页码数
|
...
|
...
|
@@ -577,6 +577,7 @@ exports.handleFilterData = (origin, params) => { |
|
|
|
|
|
// 处理颜色选中数据
|
|
|
if (color.checked) {
|
|
|
color['href'] = handleFilterUrl(params, null, {color: value.color_id});
|
|
|
dest.checkedConditions.conditions.push(color);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -595,6 +596,7 @@ exports.handleFilterData = (origin, params) => { |
|
|
|
|
|
// 处理颜色年龄段数据
|
|
|
if (ageLevel.checked) {
|
|
|
ageLevel['href'] = handleFilterUrl(params, null, {ageLevel: value.id});
|
|
|
dest.checkedConditions.conditions.push(ageLevel);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -1037,3 +1039,22 @@ exports.handleFilterUrl = handleFilterUrl; |
|
|
* @type {[type]}
|
|
|
*/
|
|
|
exports.handleCheckedData = handleCheckedData;
|
|
|
|
|
|
exports.handleNextPage = (params, total) => {
|
|
|
|
|
|
let href;
|
|
|
let currentPage = parseInt((_.isEmpty(params.page) ? 1 : params.page), 10); // 当前页
|
|
|
let perPageCount = parseInt((_.isEmpty(params.limit) ? 60 : params.limit), 10); // 每页商品数
|
|
|
let totalPage = parseInt(total / perPageCount, 10) + 1; // 总页数
|
|
|
|
|
|
if (currentPage === totalPage) {
|
|
|
return null;
|
|
|
} else {
|
|
|
href = handleFilterUrl(params, {page: currentPage + 1});
|
|
|
}
|
|
|
|
|
|
return {
|
|
|
href : href,
|
|
|
src : '//img10.static.yhbimg.com/product/2014/01/15/11/01fa01614784f6239760f1b749663016f1.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90'
|
|
|
}
|
|
|
} |
|
|
\ No newline at end of file |
...
|
...
|
|