Authored by 陈峰

Merge branch 'gray' of http://git.yoho.cn/fe/yohoblk-wap into gray

@@ -7,13 +7,21 @@ const processProductList = require(`${global.utils}/beautify/product`); @@ -7,13 +7,21 @@ const processProductList = require(`${global.utils}/beautify/product`);
7 7
8 const search = { 8 const search = {
9 products(params) { 9 products(params) {
  10 + let method = 'app.search.li';
  11 +
10 if (params.hasOwnProperty('priceRange')) { 12 if (params.hasOwnProperty('priceRange')) {
11 params.price = params.priceRange; 13 params.price = params.priceRange;
12 delete params.priceRange; 14 delete params.priceRange;
13 } 15 }
14 16
  17 + if (params.filter_poolId) {
  18 + params.productPool = params.filter_poolId;
  19 + delete params.filter_poolId;
  20 + method = 'app.search.pool';
  21 + }
  22 +
15 const data = _.merge({ 23 const data = _.merge({
16 - method: 'app.search.li' 24 + method
17 }, params); 25 }, params);
18 26
19 return api.get('', data, { 27 return api.get('', data, {
@@ -38,22 +38,13 @@ import FilterSub from './filter-sub.vue'; @@ -38,22 +38,13 @@ import FilterSub from './filter-sub.vue';
38 38
39 let locationQuery = qs(decodeURIComponent(location.search.replace(/^\?/, ''))); 39 let locationQuery = qs(decodeURIComponent(location.search.replace(/^\?/, '')));
40 40
41 -const keyMap = {  
42 - 品牌: 'brand',  
43 - 品类: 'sort',  
44 - 颜色: 'color',  
45 - 尺寸: 'size',  
46 - 价格: 'price',  
47 - 折扣: 'discount'  
48 -};  
49 -  
50 const convertMap = { 41 const convertMap = {
51 brand: 'brand', 42 brand: 'brand',
52 group_sort: 'sort', 43 group_sort: 'sort',
53 color: 'color', 44 color: 'color',
54 size: 'size', 45 size: 'size',
55 price: 'price', 46 price: 'price',
56 - discount: 'discount', 47 + discount: 'p_d',
57 }; 48 };
58 49
59 export default { 50 export default {