Authored by yyq

list parameter

@@ -47,6 +47,20 @@ const _getGender = (channel) => { @@ -47,6 +47,20 @@ const _getGender = (channel) => {
47 * 获取商品分类列表数据 47 * 获取商品分类列表数据
48 */ 48 */
49 const getListData = (params, channel) => { 49 const getListData = (params, channel) => {
  50 + let standard = [];
  51 +
  52 + _.forEach(params, (value, key) => {
  53 + let s = _.split(key, 'parameter_', 2);
  54 +
  55 + if (s.length > 1) {
  56 + standard.push(`${s[1]}_${value}`);
  57 + _.unset(params, `${key}`);
  58 + }
  59 + });
  60 +
  61 + if (standard.length) {
  62 + params.standard = standard.join(',');
  63 + }
50 64
51 let searchParams = searchHandler.getSearchParams(params); 65 let searchParams = searchHandler.getSearchParams(params);
52 66
@@ -576,7 +590,7 @@ const getShopData = (shopId, channel, params, shopInfo) => { @@ -576,7 +590,7 @@ const getShopData = (shopId, channel, params, shopInfo) => {
576 '?imageView/1/w/{width}/h/{height}', 590 '?imageView/1/w/{width}/h/{height}',
577 title: value.product_name, 591 title: value.product_name,
578 price: ${value.sales_price}` 592 price: ${value.sales_price}`
579 - } 593 + };
580 }); 594 });
581 595
582 if (_.has(finalResult, 'newArrivel.list')) { 596 if (_.has(finalResult, 'newArrivel.list')) {
@@ -805,4 +819,4 @@ module.exports = { @@ -805,4 +819,4 @@ module.exports = {
805 getShopData, 819 getShopData,
806 getShopListData, 820 getShopListData,
807 getBaseShopData 821 getBaseShopData
808 -} 822 +};