Showing
1 changed file
with
6 additions
and
4 deletions
@@ -300,6 +300,8 @@ const _getSkuDataByProductBaseInfo = (data) => { | @@ -300,6 +300,8 @@ const _getSkuDataByProductBaseInfo = (data) => { | ||
300 | let defaultImage = '';// 默认图 | 300 | let defaultImage = '';// 默认图 |
301 | let chooseSkuFlag = false; // 选中状态 | 301 | let chooseSkuFlag = false; // 选中状态 |
302 | 302 | ||
303 | + let fixQuality = imageUrl => imageUrl.replace('/quality/70', '/quality/90'); | ||
304 | + | ||
303 | if (data.goodsList) { | 305 | if (data.goodsList) { |
304 | skuGoods = _.get(data, 'goodsList', []).reduce((acc, cur, pos)=> { | 306 | skuGoods = _.get(data, 'goodsList', []).reduce((acc, cur, pos)=> { |
305 | 307 | ||
@@ -313,7 +315,7 @@ const _getSkuDataByProductBaseInfo = (data) => { | @@ -313,7 +315,7 @@ const _getSkuDataByProductBaseInfo = (data) => { | ||
313 | if (cur.goodsImagesList) { | 315 | if (cur.goodsImagesList) { |
314 | // 商品列表 | 316 | // 商品列表 |
315 | goodsGroup.productSkc = cur.productSkc; | 317 | goodsGroup.productSkc = cur.productSkc; |
316 | - goodsGroup.src = helpers.image(cur.colorImage, 40, 40); | 318 | + goodsGroup.src = fixQuality(helpers.image(cur.colorImage, 40, 40)); |
317 | goodsGroup.title = `${_.trim(data.productName)} ${cur.colorName}`; | 319 | goodsGroup.title = `${_.trim(data.productName)} ${cur.colorName}`; |
318 | goodsGroup.name = cur.colorName; | 320 | goodsGroup.name = cur.colorName; |
319 | goodsGroup.focus = false; | 321 | goodsGroup.focus = false; |
@@ -326,8 +328,8 @@ const _getSkuDataByProductBaseInfo = (data) => { | @@ -326,8 +328,8 @@ const _getSkuDataByProductBaseInfo = (data) => { | ||
326 | if (good.imageUrl) { | 328 | if (good.imageUrl) { |
327 | goodsGroup.thumbs.push({ | 329 | goodsGroup.thumbs.push({ |
328 | url: '', | 330 | url: '', |
329 | - shower: helpers.image(good.imageUrl, 420, 560), | ||
330 | - img: helpers.image(good.imageUrl, 75, 100) | 331 | + shower: fixQuality(helpers.image(good.imageUrl, 420, 560)), |
332 | + img: fixQuality(helpers.image(good.imageUrl, 75, 100)) | ||
331 | }); | 333 | }); |
332 | } | 334 | } |
333 | }); | 335 | }); |
@@ -339,7 +341,7 @@ const _getSkuDataByProductBaseInfo = (data) => { | @@ -339,7 +341,7 @@ const _getSkuDataByProductBaseInfo = (data) => { | ||
339 | 341 | ||
340 | // 默认第一张图片 | 342 | // 默认第一张图片 |
341 | if (pos === 0) { | 343 | if (pos === 0) { |
342 | - defaultImage = helpers.image(cur.colorImage, 420, 560); | 344 | + defaultImage = fixQuality(helpers.image(cur.colorImage, 420, 560)); |
343 | } | 345 | } |
344 | 346 | ||
345 | // 商品的尺码列表 | 347 | // 商品的尺码列表 |
-
Please register or login to post a comment