Authored by 郭成尧

'接口防毒'

@@ -237,8 +237,10 @@ exports.getSaleOthersData = (params, channel) => { @@ -237,8 +237,10 @@ exports.getSaleOthersData = (params, channel) => {
237 if (result[1].code === 200) { 237 if (result[1].code === 200) {
238 finalResult.goods = productProcess.processProductList(result[1].data.product_list); 238 finalResult.goods = productProcess.processProductList(result[1].data.product_list);
239 239
240 - // 顶部筛选条件  
241 - finalResult.filters = saleHandler.handleSaleFilterData(result[1].data.filter, params); 240 + if (!_.isEmpty(result[1].data.filter)) {
  241 + // 顶部筛选条件
  242 + finalResult.filters = saleHandler.handleSaleFilterData(result[1].data.filter, params);
  243 + }
242 244
243 // 处理排序数据 245 // 处理排序数据
244 finalResult.opts = saleHandler.handleSaleOptsData(params, result[1].data.total); 246 finalResult.opts = saleHandler.handleSaleOptsData(params, result[1].data.total);
@@ -387,9 +389,13 @@ exports.getSalebreakingYardsData = (params, channel) => { @@ -387,9 +389,13 @@ exports.getSalebreakingYardsData = (params, channel) => {
387 389
388 // 处理商品数据 390 // 处理商品数据
389 if (subResult[1].code === 200) { 391 if (subResult[1].code === 200) {
390 - finalResult.filters = saleHandler.handleSaleFilterData(  
391 - Object.assign(subResult[1].data.filter, {size: result[2].data}),  
392 - params); 392 +
  393 + if (!_.isEmpty(subResult[1].data.filter)) {
  394 + finalResult.filters = saleHandler.handleSaleFilterData(
  395 + Object.assign(subResult[1].data.filter, {size: result[2].data}),
  396 + params);
  397 + }
  398 +
393 finalResult.goods = productProcess.processProductList(subResult[1].data.product_list); 399 finalResult.goods = productProcess.processProductList(subResult[1].data.product_list);
394 finalResult.opts = saleHandler.handleSaleOptsData(params, subResult[1].data.total); 400 finalResult.opts = saleHandler.handleSaleOptsData(params, subResult[1].data.total);
395 finalResult.totalCount = subResult[1].data.total; 401 finalResult.totalCount = subResult[1].data.total;