...
|
...
|
@@ -31,6 +31,8 @@ const GIRLS = 'girls'; |
|
|
const KIDS = 'kids';
|
|
|
const LIFESTYLE = 'lifestyle';
|
|
|
|
|
|
const GLOBAL_BASE_URI = '/product/global/list';
|
|
|
|
|
|
/**
|
|
|
* 获取品牌一览资源位&channelType
|
|
|
*
|
...
|
...
|
@@ -167,13 +169,14 @@ const getBrandViewList = (channel, start, length) => { |
|
|
}
|
|
|
|
|
|
// 品牌list A-Z 0-9
|
|
|
if (res.data && res.data.brands) {
|
|
|
if (res.data && res.data.all_list) {
|
|
|
|
|
|
_.forEach(res.data.brands, (subValue, key) => {
|
|
|
_.forEach(res.data.all_list, (subValue, key) => {
|
|
|
let listTmp = [];
|
|
|
|
|
|
_.forEach(subValue, ssubValue => {
|
|
|
let extQs = {};
|
|
|
let baseUri = '';
|
|
|
|
|
|
// 为品牌名称
|
|
|
let href;
|
...
|
...
|
@@ -183,22 +186,35 @@ const getBrandViewList = (channel, start, length) => { |
|
|
} else if (switchParams.channelType === 2) {
|
|
|
Object.assign(extQs, {gender: '2,3'});
|
|
|
}
|
|
|
let shopInfo, shopId;
|
|
|
|
|
|
switch (ssubValue.type * 1) {
|
|
|
case 1:
|
|
|
extQs = {query: ssubValue.brand_domain};
|
|
|
extQs = {
|
|
|
query: ssubValue.brand_domain,
|
|
|
brand: ssubValue.id
|
|
|
};
|
|
|
ssubValue.brand_domain = 'search';
|
|
|
break;
|
|
|
case 2:
|
|
|
if (ssubValue.shop_id) {
|
|
|
Object.assign(extQs, {shopId: ssubValue.shop_id});
|
|
|
shopInfo = _.get(ssubValue, 'shop_info.yoho_shop_list[0]', {});
|
|
|
shopId = shopInfo.shop_id || ssubValue.shop_id;
|
|
|
|
|
|
ssubValue.brand_domain = shopInfo.shop_domain || ssubValue.brand_domain;
|
|
|
if (shopId) {
|
|
|
Object.assign(extQs, {shopId: shopId});
|
|
|
}
|
|
|
break;
|
|
|
case 3:
|
|
|
Object.assign(extQs, {brand: ssubValue.id});
|
|
|
ssubValue.brand_domain = '';
|
|
|
baseUri = GLOBAL_BASE_URI;
|
|
|
break;
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
href = helpers.urlFormat('', extQs, ssubValue.brand_domain);
|
|
|
href = helpers.urlFormat(baseUri, extQs, ssubValue.brand_domain);
|
|
|
|
|
|
let brandItem = {
|
|
|
name: ssubValue.brand_name,
|
...
|
...
|
|