Authored by yyq

Merge branch 'feature/newGolbal' into release/5.6

... ... @@ -38,8 +38,16 @@ const getGlobalProductHtmlAsync = (skn, channelNum) => {
}, config.apiCache);
};
const getGlobalBrandInfoAsync = brand => {
return globalApi.get('editor/api/v1/brand/get', {
brandId: brand
}, config.apiCache);
};
module.exports = {
getGlobalProductListAsync,
getGlobalProductDetailAsync,
getGlobalProductHtmlAsync
getGlobalProductHtmlAsync,
getGlobalBrandInfoAsync
};
... ...
... ... @@ -150,7 +150,8 @@ const getGlobalProductListData = (params, yoho) => {
}, dps)),
list: globalApi.getGlobalProductListAsync(Object.assign({
physical_channel: yoho.channelNum
}, params, {limit: limitNum}))
}, params, {limit: limitNum})),
brand: dps.brand ? globalApi.getGlobalBrandInfoAsync(dps.brand) : {}
}).then(result => {
let resData = {};
... ... @@ -193,13 +194,11 @@ const getGlobalProductListData = (params, yoho) => {
let pathInfo = {};
if (dps.brand) {
let bandInfo = _.find(_.get(result.fullList, 'data.filter.brand', []), o => {
return o.id * 1 === dps.brand * 1;
});
let brandName = _.get(result.brand, 'data.brand_name', '');
if (bandInfo) {
if (brandName) {
pathInfo.brand = {
name: bandInfo.brand_name
name: brandName
};
}
}
... ...
... ... @@ -311,11 +311,13 @@ const getShopList = params => {
home: helpers.urlFormat('', null, value.shop_domain || value.brand_domain),
logo: value.shop_logo || value.brand_ico,
shopName: value.shop_name || value.brand_name,
shopType: '',
sort: []
};
if (value.is_global === 'Y') {
shopInfo.home = helpers.urlFormat(GLOBAL_BASE_URI, {brand: value.global_brand_id});
shopInfo.shopType = 'global-brand';
}
// 店铺/品牌的小分类
... ...
... ... @@ -6,7 +6,7 @@
</a>
<div class="name pull-left">
<a class="shop-name" href="{{home}}">{{shopName}}</a>
<a class="shop-name {{shopType}}" href="{{home}}">{{shopName}}</a>
<p class="sorts">
{{#each sort}}
<a href="{{href}}">{{name}}</a>
... ... @@ -24,4 +24,4 @@
</a>
</div>
{{/ shopEntry}}
</div>
\ No newline at end of file
</div>
... ...
... ... @@ -18,6 +18,16 @@
font-size: 16px;
color: #222;
line-height: 26px;
&.global-brand:after {
content: "";
width: 54px;
height: 20px;
margin-left: 6px;
display: inline-block;
background-image: url("/product/global-path-icon.png");
vertical-align: text-bottom;
}
}
.sorts {
... ...