Authored by 毕凯

Merge branch 'hotfix/shopfav' into 'gray'

brand-jump



See merge request !849
... ... @@ -151,20 +151,15 @@ class favoriteIndexModel extends global.yoho.BaseModel {
let obj = {
productList: []
};
let shopOrBrandLink;
// if (empty(val.productSkn)) {
// continue;
// }
if (val.brandOrShopType === 'brandOrShopType') {
obj = _.assign(obj, {
link: helpers.urlFormat('/product/index/brand', {
shop_id: val.shopId
})
if (val.brandOrShopType === 'brand') {
shopOrBrandLink = helpers.urlFormat('/product/shop', {
brand_id: val.brandId
});
} else {
obj = _.assign(obj, {
link: helpers.urlFormat('', {}, val.brandDomain)
shopOrBrandLink = helpers.urlFormat('/product/shop', {
shop_id: val.shopId
});
}
... ... @@ -175,9 +170,7 @@ class favoriteIndexModel extends global.yoho.BaseModel {
discount: val.productDiscountNum,
brandImg: val.brandIco,
update: val.newProductNum,
link: helpers.urlFormat('/product/shop', {
shop_id: val.shopId
})
link: shopOrBrandLink
});
_.forEach(val.newProduct, function(data, key) {
... ...