|
@@ -31,6 +31,8 @@ const GIRLS = 'girls'; |
|
@@ -31,6 +31,8 @@ const GIRLS = 'girls'; |
31
|
const KIDS = 'kids';
|
31
|
const KIDS = 'kids';
|
32
|
const LIFESTYLE = 'lifestyle';
|
32
|
const LIFESTYLE = 'lifestyle';
|
33
|
|
33
|
|
|
|
34
|
+const GLOBAL_BASE_URI = '/product/global/list';
|
|
|
35
|
+
|
34
|
/**
|
36
|
/**
|
35
|
* 获取品牌一览资源位&channelType
|
37
|
* 获取品牌一览资源位&channelType
|
36
|
*
|
38
|
*
|
|
@@ -167,13 +169,14 @@ const getBrandViewList = (channel, start, length) => { |
|
@@ -167,13 +169,14 @@ const getBrandViewList = (channel, start, length) => { |
167
|
}
|
169
|
}
|
168
|
|
170
|
|
169
|
// 品牌list A-Z 0-9
|
171
|
// 品牌list A-Z 0-9
|
170
|
- if (res.data && res.data.brands) {
|
172
|
+ if (res.data && res.data.all_list) {
|
171
|
|
173
|
|
172
|
- _.forEach(res.data.brands, (subValue, key) => {
|
174
|
+ _.forEach(res.data.all_list, (subValue, key) => {
|
173
|
let listTmp = [];
|
175
|
let listTmp = [];
|
174
|
|
176
|
|
175
|
_.forEach(subValue, ssubValue => {
|
177
|
_.forEach(subValue, ssubValue => {
|
176
|
let extQs = {};
|
178
|
let extQs = {};
|
|
|
179
|
+ let baseUri = '';
|
177
|
|
180
|
|
178
|
// 为品牌名称
|
181
|
// 为品牌名称
|
179
|
let href;
|
182
|
let href;
|
|
@@ -183,22 +186,35 @@ const getBrandViewList = (channel, start, length) => { |
|
@@ -183,22 +186,35 @@ const getBrandViewList = (channel, start, length) => { |
183
|
} else if (switchParams.channelType === 2) {
|
186
|
} else if (switchParams.channelType === 2) {
|
184
|
Object.assign(extQs, {gender: '2,3'});
|
187
|
Object.assign(extQs, {gender: '2,3'});
|
185
|
}
|
188
|
}
|
|
|
189
|
+ let shopInfo, shopId;
|
186
|
|
190
|
|
187
|
switch (ssubValue.type * 1) {
|
191
|
switch (ssubValue.type * 1) {
|
188
|
case 1:
|
192
|
case 1:
|
189
|
- extQs = {query: ssubValue.brand_domain};
|
193
|
+ extQs = {
|
|
|
194
|
+ query: ssubValue.brand_domain,
|
|
|
195
|
+ brand: ssubValue.id
|
|
|
196
|
+ };
|
190
|
ssubValue.brand_domain = 'search';
|
197
|
ssubValue.brand_domain = 'search';
|
191
|
break;
|
198
|
break;
|
192
|
case 2:
|
199
|
case 2:
|
193
|
- if (ssubValue.shop_id) {
|
|
|
194
|
- Object.assign(extQs, {shopId: ssubValue.shop_id});
|
200
|
+ shopInfo = _.get(ssubValue, 'shop_info.yoho_shop_list[0]', {});
|
|
|
201
|
+ shopId = shopInfo.shop_id || ssubValue.shop_id;
|
|
|
202
|
+
|
|
|
203
|
+ ssubValue.brand_domain = shopInfo.shop_domain || ssubValue.brand_domain;
|
|
|
204
|
+ if (shopId) {
|
|
|
205
|
+ Object.assign(extQs, {shopId: shopId});
|
195
|
}
|
206
|
}
|
196
|
break;
|
207
|
break;
|
|
|
208
|
+ case 3:
|
|
|
209
|
+ Object.assign(extQs, {brand: ssubValue.id});
|
|
|
210
|
+ ssubValue.brand_domain = '';
|
|
|
211
|
+ baseUri = GLOBAL_BASE_URI;
|
|
|
212
|
+ break;
|
197
|
default:
|
213
|
default:
|
198
|
break;
|
214
|
break;
|
199
|
}
|
215
|
}
|
200
|
|
216
|
|
201
|
- href = helpers.urlFormat('', extQs, ssubValue.brand_domain);
|
217
|
+ href = helpers.urlFormat(baseUri, extQs, ssubValue.brand_domain);
|
202
|
|
218
|
|
203
|
let brandItem = {
|
219
|
let brandItem = {
|
204
|
name: ssubValue.brand_name,
|
220
|
name: ssubValue.brand_name,
|