Authored by 郭成尧

global-cart-handle

... ... @@ -31,9 +31,18 @@ const _relatedBrand = (getBrand, isApp) => {
relatedBrand.forEach(brand => {
brand.thumb = brand.thumb.replace('http://', '//');
if (brand.isGlobal === 'Y') {
brand.url = helpers.urlFormat('/product/global/list', {brand: brand.tbl_id});
}
if (isApp) {
brand.url = brand.url + '?openby:yohobuy={"action":"go.brand","params":{"brand_id":"' + brand.id + '"}}';
if (brand.isGlobal === 'Y') {
brand.url = brand.url +
'?openby:yohobuy={"action":"go.globalpurchase","params":{"brand":"' + brand.id + '"}}';
} else {
brand.url = brand.url +
'?openby:yohobuy={"action":"go.brand","params":{"brand_id":"' + brand.id + '"}}';
}
}
});
... ...
... ... @@ -5,10 +5,12 @@
<div class="focus-small"></div>
</div>
</div>
<div class="lable-info-box{{#if isApp}} lable-infobox-borderadius{{/if}}"><a href="{{href}}">{{tagName}}</a></div>
<div class="lable-info-box{{#if noCart}} lable-infobox-borderadius{{/if}}"><a href="{{href}}">{{tagName}}</a></div>
{{#unless noCart}}
<div class="lable-btn add-to-cart" data-skn="{{product_skn}}">
<span class="iconfont">&#xe62c;</span>
<span class="iconfont plus">&#xe624;</span>
</div>
{{/unless}}
</div>
{{/unless}}
\ No newline at end of file
... ...
... ... @@ -161,6 +161,7 @@ $focus-size: 42px;
}
.lable-infobox-borderadius {
width: 336px;
border-top-right-radius: 40px;
border-bottom-right-radius: 40px;
}
... ...
... ... @@ -257,7 +257,8 @@ const processArticleDetail = (articleContent, isApp, gender, isWeixin, isqq, isW
_.forEach(tagListGlobal, tagGlobal => {
tagList.push(Object.assign(tagGlobal, {
href: '//m.yohobuy.com/product/global/' + tagGlobal.product_skn + '.html',
isApp: isApp
isApp: isApp,
noCart: true
}));
});
}
... ... @@ -267,7 +268,8 @@ const processArticleDetail = (articleContent, isApp, gender, isWeixin, isqq, isW
_.forEach(tagListLimit, tagLimit => {
tagList.push(Object.assign(tagLimit, {
href: '//m.yohobuy.com/product/' + tagLimit.product_skn + '.html',
isApp: isApp
isApp: isApp,
noCart: true
}));
});
}
... ...