Authored by 郭成尧

'折扣专区选中状态'

... ... @@ -576,11 +576,22 @@ exports.handleSaleSortData = (origin, params, extra) => {
leftContent.allSort = {};
leftContent.allSort.list = [];
leftContent.allSort.all = {
name: '全部品类',
href: handleFilterUrl(params),
num: extra
};
if (extra === 'discount') {
let tempParams = _.cloneDeep(params);
delete tempParams.sort;
leftContent.allSort.all = {
name: '全部品类',
href: handleFilterUrl(tempParams),
active: _.isEmpty(params.sort) ? true : false
};
} else {
leftContent.allSort.all = {
name: '全部品类',
href: handleFilterUrl(params)
};
}
_.forEach(origin, function(value) {
... ... @@ -634,7 +645,7 @@ exports.handleSaleActivityData = (origin, channel) => {
if (key < 3) {
dest.big.push(activity);
} else if (key < 15) {
} else if (key < 27) {
dest.normal.push(activity);
}
});
... ...
... ... @@ -344,7 +344,8 @@ exports.getSaleDiscountData = (params, channel) => {
// 处理分页等筛选信息
if (result[3].code === 200) {
finalResult.leftContent = saleHandler.handleSaleSortData(result[3].data.filter.group_sort, params);
finalResult.leftContent =
saleHandler.handleSaleSortData(result[3].data.filter.group_sort, params, 'discount');
finalResult.saleList.pager = saleHandler.handleSalePagerData(result[3].data.total, params);
finalResult.saleList.opts = saleHandler.handleSaleOptsData(params, result[3].data.total);
}
... ...