Authored by 刘传洋

search filter ext

@@ -87,7 +87,8 @@ exports.getListData = (params, channel) => { @@ -87,7 +87,8 @@ exports.getListData = (params, channel) => {
87 // 获取商品数据和顶部筛选条件 87 // 获取商品数据和顶部筛选条件
88 if (result[2].code === 200) { 88 if (result[2].code === 200) {
89 Object.assign(finalResult.list, { 89 Object.assign(finalResult.list, {
90 - filters: searchHandler.handleFilterData(result[2].data.filter, params), 90 + //filters: searchHandler.handleFilterData(result[2].data.filter, params),
  91 + filters: searchHandler.handleFilterDataAll(result[2].data, params),
91 opts: searchHandler.handleOptsData(params, result[2].data.total, result[2].data.filter), 92 opts: searchHandler.handleOptsData(params, result[2].data.total, result[2].data.filter),
92 totalCount: result[2].data.total, 93 totalCount: result[2].data.total,
93 footPager: searchHandler.handlePagerData(result[2].data.total, params), 94 footPager: searchHandler.handlePagerData(result[2].data.total, params),
@@ -96,12 +97,12 @@ exports.getListData = (params, channel) => { @@ -96,12 +97,12 @@ exports.getListData = (params, channel) => {
96 }); 97 });
97 98
98 // 获取高级筛选条件 99 // 获取高级筛选条件
99 - if (finalResult.list && finalResult.list.filters) { 100 + /*if (finalResult.list && finalResult.list.filters) {
100 Object.assign(finalResult.list.filters, searchHandler.handleSeniorFilterData({ 101 Object.assign(finalResult.list.filters, searchHandler.handleSeniorFilterData({
101 style: _.get(result[2], 'data.filter.style', []), 102 style: _.get(result[2], 'data.filter.style', []),
102 standard: _.get(result[2], 'data.standard', []) 103 standard: _.get(result[2], 'data.standard', [])
103 }, params)); 104 }, params));
104 - } 105 + }*/
105 } 106 }
106 107
107 // 分类介绍 108 // 分类介绍
@@ -126,7 +127,7 @@ exports.getListNewData = (params, channel) => { @@ -126,7 +127,7 @@ exports.getListNewData = (params, channel) => {
126 let apiMethod = [ 127 let apiMethod = [
127 headerModel.requestHeaderData(channel), 128 headerModel.requestHeaderData(channel),
128 searchApi.getSortList(), 129 searchApi.getSortList(),
129 - searchApi.getProductList(params), 130 + searchApi.getProductList(Object.assign({new: 'Y'}, params)),
130 searchApi.getWeekNew(params) 131 searchApi.getWeekNew(params)
131 ]; 132 ];
132 133
@@ -151,7 +152,8 @@ exports.getListNewData = (params, channel) => { @@ -151,7 +152,8 @@ exports.getListNewData = (params, channel) => {
151 // 获取商品数据和顶部筛选条件 152 // 获取商品数据和顶部筛选条件
152 if (result[2].code === 200) { 153 if (result[2].code === 200) {
153 Object.assign(finalResult.list, { 154 Object.assign(finalResult.list, {
154 - filters: searchHandler.handleFilterData(result[2].data.filter, params), 155 + //filters: searchHandler.handleFilterData(result[2].data.filter, params),
  156 + filters: searchHandler.handleFilterDataAll(result[2].data, params),
155 opts: searchHandler.handleOptsData(params, result[2].data.total, result[2].data.filter), 157 opts: searchHandler.handleOptsData(params, result[2].data.total, result[2].data.filter),
156 totalCount: result[2].data.total, 158 totalCount: result[2].data.total,
157 footPager: searchHandler.handlePagerData(result[2].data.total, params), 159 footPager: searchHandler.handlePagerData(result[2].data.total, params),
@@ -160,12 +162,12 @@ exports.getListNewData = (params, channel) => { @@ -160,12 +162,12 @@ exports.getListNewData = (params, channel) => {
160 }); 162 });
161 163
162 // 获取高级筛选条件 164 // 获取高级筛选条件
163 - if (finalResult.list && finalResult.list.filters) { 165 + /*if (finalResult.list && finalResult.list.filters) {
164 Object.assign(finalResult.list.filters, searchHandler.handleSeniorFilterData({ 166 Object.assign(finalResult.list.filters, searchHandler.handleSeniorFilterData({
165 style: _.get(result[2], 'data.filter.style', []), 167 style: _.get(result[2], 'data.filter.style', []),
166 standard: _.get(result[2], 'data.standard', []) 168 standard: _.get(result[2], 'data.standard', [])
167 }, params)); 169 }, params));
168 - } 170 + }*/
169 } 171 }
170 172
171 // 新品上架 173 // 新品上架
@@ -516,7 +518,8 @@ exports.getShopListData = (channel, params) => { @@ -516,7 +518,8 @@ exports.getShopListData = (channel, params) => {
516 } 518 }
517 519
518 Object.assign(finalResult, { 520 Object.assign(finalResult, {
519 - filters: searchHandler.handleFilterData(_.get(result[2], 'data.filter', {}), params), 521 + //filters: searchHandler.handleFilterData(_.get(result[2], 'data.filter', {}), params),
  522 + filters: searchHandler.handleFilterDataAll(result[2].data, params),
520 opts: searchHandler.handleOptsData(params, tip.total), 523 opts: searchHandler.handleOptsData(params, tip.total),
521 goods: productProcess.processProductList(_.get(result[2], 'data.product_list', []), { 524 goods: productProcess.processProductList(_.get(result[2], 'data.product_list', []), {
522 newCoverSort: true, 525 newCoverSort: true,
@@ -527,12 +530,12 @@ exports.getShopListData = (channel, params) => { @@ -527,12 +530,12 @@ exports.getShopListData = (channel, params) => {
527 }); 530 });
528 531
529 // 获取高级筛选条件 532 // 获取高级筛选条件
530 - if (finalResult.list && finalResult.list.filters) { 533 + /*if (finalResult.list && finalResult.list.filters) {
531 Object.assign(finalResult.list.filters, searchHandler.handleSeniorFilterData({ 534 Object.assign(finalResult.list.filters, searchHandler.handleSeniorFilterData({
532 style: _.get(result[2], 'data.filter.style', []), 535 style: _.get(result[2], 'data.filter.style', []),
533 standard: _.get(result[2], 'data.standard', []) 536 standard: _.get(result[2], 'data.standard', [])
534 }, params)); 537 }, params));
535 - } 538 + }*/
536 } 539 }
537 540
538 if (result[3].code === 200) { 541 if (result[3].code === 200) {