Authored by wenjiekong

折扣详情页,添加个默认排序

... ... @@ -215,8 +215,7 @@ exports.handleSaleOptsData = (params, total, extra) => {
let count = (extra === 'discont') ? 3 : 4;
if (extra === 'default') {
let defaultOpt = {},
defaultParams = params;
let defaultOpt = {};
defaultOpt.href = handleFilterUrl(params, {order: ''});
defaultOpt.name = '默认';
... ...
... ... @@ -366,9 +366,9 @@ exports.getSaleDiscountData = (params, channel) => {
]).then(result => {
let finalResult = result[0];
//默认order: ''
// 默认order: ''
if (_.isEmpty(params.order)) {
Object.assign(params, {order: ''})
Object.assign(params, {order: ''});
}
// 处理折扣专场标题 banner 数据
... ... @@ -401,7 +401,9 @@ exports.getSaleDiscountData = (params, channel) => {
// 处理分页等筛选信息
if (subResult[0].code === 200) {
Object.assign(finalResult, {
leftContent: publicHandler.handleSaleSortData(subResult[0].data.filter.group_sort, params, 'discount'),
leftContent: publicHandler.handleSaleSortData(subResult[0].data.filter.group_sort,
params,
'discount'),
saleList: {
footPager: publicHandler.handlePagerData(subResult[0].data.total, params),
opts: publicHandler.handleSaleOptsData(params, subResult[0].data.total, 'default')
... ...