...
|
...
|
@@ -4,7 +4,8 @@ const fp = require('lodash/fp'); |
|
|
|
|
|
const camelCase = global.yoho.camelCase;
|
|
|
const helpers = global.yoho.helpers;
|
|
|
const images = require(`${global.utils}/images`);
|
|
|
|
|
|
// const images = require(`${global.utils}/images`);
|
|
|
|
|
|
// NOTE: 这里修改了图片质量的参数
|
|
|
helpers.image = _.flow(helpers.image, fp.replace(/\/quality\/\d*$/, '/quality/90'));
|
...
|
...
|
@@ -393,7 +394,7 @@ exports.processProduct = (productData, options) => { |
|
|
|
|
|
result.id = productData.product_skn;
|
|
|
result.product_id = productData.product_id;
|
|
|
result.thumb = images.getImageUrl(productData.default_images, options.width, options.height);
|
|
|
result.thumb = helpers.image(productData.default_images, options.width, options.height);
|
|
|
result.name = productData.product_name;
|
|
|
result.price = !productData.market_price ? false : productData.market_price;
|
|
|
result.salePrice = productData.sales_price;
|
...
|
...
|
|