Authored by 李奇

fixed: 店铺品牌列表页添加channel和gender参数

@@ -31,6 +31,7 @@ @@ -31,6 +31,7 @@
31 import qs from 'yoho-qs/parse'; 31 import qs from 'yoho-qs/parse';
32 import bus from 'common/vue-bus'; 32 import bus from 'common/vue-bus';
33 import tip from 'common/tip'; 33 import tip from 'common/tip';
  34 + import cookie from 'yoho-cookie';
34 35
35 import topBar from 'product/shop/top-bar.vue'; // 顶部栏,包括返回、收藏店铺、分享,打开筛选页面 36 import topBar from 'product/shop/top-bar.vue'; // 顶部栏,包括返回、收藏店铺、分享,打开筛选页面
36 import shopTop from 'product/shop/shop-top.vue'; // 店铺头部信息 37 import shopTop from 'product/shop/shop-top.vue'; // 店铺头部信息
@@ -41,6 +42,21 @@ @@ -41,6 +42,21 @@
41 42
42 const $shop = $('#shop'); 43 const $shop = $('#shop');
43 44
  45 + const channelTrans = {
  46 + men: {
  47 + key: 'MEN男士',
  48 + code: '1,3'
  49 + },
  50 + women: {
  51 + key: 'WOMEN女士',
  52 + code: '2,3'
  53 + },
  54 + lifestyle: {
  55 + key: 'LIFESTYLE生活',
  56 + code: '1,2,3'
  57 + }
  58 + };
  59 +
44 const shareSubTitle = '我在BLK发现了一个不错的品牌,赶快来看看吧!'; 60 const shareSubTitle = '我在BLK发现了一个不错的品牌,赶快来看看吧!';
45 let locationQuery = qs(decodeURIComponent(location.search.replace(/^\?/, ''))); 61 let locationQuery = qs(decodeURIComponent(location.search.replace(/^\?/, '')));
46 62
@@ -160,7 +176,11 @@ @@ -160,7 +176,11 @@
160 } 176 }
161 177
162 this.inSearching = true; 178 this.inSearching = true;
  179 + let channel = cookie.get('_Channel') || 'men';
  180 + let gender = channelTrans[channel].code || '1,3';
163 return $.get(this.url, Object.assign({ 181 return $.get(this.url, Object.assign({
  182 + gender,
  183 + channel,
164 order: this.order, 184 order: this.order,
165 page: nextPage 185 page: nextPage
166 }, locationQuery, this.filter)).done(result => { 186 }, locationQuery, this.filter)).done(result => {