Merge branch 'hotfix/shopfav' into 'gray'
brand-jump See merge request !849
Showing
1 changed file
with
7 additions
and
14 deletions
@@ -151,20 +151,15 @@ class favoriteIndexModel extends global.yoho.BaseModel { | @@ -151,20 +151,15 @@ class favoriteIndexModel extends global.yoho.BaseModel { | ||
151 | let obj = { | 151 | let obj = { |
152 | productList: [] | 152 | productList: [] |
153 | }; | 153 | }; |
154 | + let shopOrBrandLink; | ||
154 | 155 | ||
155 | - // if (empty(val.productSkn)) { | ||
156 | - // continue; | ||
157 | - // } | ||
158 | - if (val.brandOrShopType === 'brandOrShopType') { | ||
159 | - obj = _.assign(obj, { | ||
160 | - link: helpers.urlFormat('/product/index/brand', { | ||
161 | - shop_id: val.shopId | ||
162 | - }) | 156 | + if (val.brandOrShopType === 'brand') { |
157 | + shopOrBrandLink = helpers.urlFormat('/product/shop', { | ||
158 | + brand_id: val.brandId | ||
163 | }); | 159 | }); |
164 | } else { | 160 | } else { |
165 | - obj = _.assign(obj, { | ||
166 | - link: helpers.urlFormat('', {}, val.brandDomain) | ||
167 | - | 161 | + shopOrBrandLink = helpers.urlFormat('/product/shop', { |
162 | + shop_id: val.shopId | ||
168 | }); | 163 | }); |
169 | } | 164 | } |
170 | 165 | ||
@@ -175,9 +170,7 @@ class favoriteIndexModel extends global.yoho.BaseModel { | @@ -175,9 +170,7 @@ class favoriteIndexModel extends global.yoho.BaseModel { | ||
175 | discount: val.productDiscountNum, | 170 | discount: val.productDiscountNum, |
176 | brandImg: val.brandIco, | 171 | brandImg: val.brandIco, |
177 | update: val.newProductNum, | 172 | update: val.newProductNum, |
178 | - link: helpers.urlFormat('/product/shop', { | ||
179 | - shop_id: val.shopId | ||
180 | - }) | 173 | + link: shopOrBrandLink |
181 | }); | 174 | }); |
182 | 175 | ||
183 | _.forEach(val.newProduct, function(data, key) { | 176 | _.forEach(val.newProduct, function(data, key) { |
-
Please register or login to post a comment