Authored by wenjiekong

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

@@ -215,8 +215,7 @@ exports.handleSaleOptsData = (params, total, extra) => { @@ -215,8 +215,7 @@ exports.handleSaleOptsData = (params, total, extra) => {
215 let count = (extra === 'discont') ? 3 : 4; 215 let count = (extra === 'discont') ? 3 : 4;
216 216
217 if (extra === 'default') { 217 if (extra === 'default') {
218 - let defaultOpt = {},  
219 - defaultParams = params; 218 + let defaultOpt = {};
220 219
221 defaultOpt.href = handleFilterUrl(params, {order: ''}); 220 defaultOpt.href = handleFilterUrl(params, {order: ''});
222 defaultOpt.name = '默认'; 221 defaultOpt.name = '默认';
@@ -366,9 +366,9 @@ exports.getSaleDiscountData = (params, channel) => { @@ -366,9 +366,9 @@ exports.getSaleDiscountData = (params, channel) => {
366 ]).then(result => { 366 ]).then(result => {
367 let finalResult = result[0]; 367 let finalResult = result[0];
368 368
369 - //默认order: '' 369 + // 默认order: ''
370 if (_.isEmpty(params.order)) { 370 if (_.isEmpty(params.order)) {
371 - Object.assign(params, {order: ''}) 371 + Object.assign(params, {order: ''});
372 } 372 }
373 373
374 // 处理折扣专场标题 banner 数据 374 // 处理折扣专场标题 banner 数据
@@ -401,7 +401,9 @@ exports.getSaleDiscountData = (params, channel) => { @@ -401,7 +401,9 @@ exports.getSaleDiscountData = (params, channel) => {
401 // 处理分页等筛选信息 401 // 处理分页等筛选信息
402 if (subResult[0].code === 200) { 402 if (subResult[0].code === 200) {
403 Object.assign(finalResult, { 403 Object.assign(finalResult, {
404 - leftContent: publicHandler.handleSaleSortData(subResult[0].data.filter.group_sort, params, 'discount'), 404 + leftContent: publicHandler.handleSaleSortData(subResult[0].data.filter.group_sort,
  405 + params,
  406 + 'discount'),
405 saleList: { 407 saleList: {
406 footPager: publicHandler.handlePagerData(subResult[0].data.total, params), 408 footPager: publicHandler.handlePagerData(subResult[0].data.total, params),
407 opts: publicHandler.handleSaleOptsData(params, subResult[0].data.total, 'default') 409 opts: publicHandler.handleSaleOptsData(params, subResult[0].data.total, 'default')