...
|
...
|
@@ -5,6 +5,8 @@ const camelCase = global.yoho.camelCase; |
|
|
const helpers = global.yoho.helpers;
|
|
|
const images = require(`${global.utils}/images`);
|
|
|
|
|
|
let fixQuality = imageUrl => imageUrl.replace('/quality/70', '/quality/90');
|
|
|
|
|
|
/**
|
|
|
* 根据性别来决定 默认图片获取字段 如果是 2、3
|
|
|
*
|
...
|
...
|
@@ -12,7 +14,7 @@ const images = require(`${global.utils}/images`); |
|
|
* 否则优先从cover1 --》 cover2 -- 》 images_url
|
|
|
*
|
|
|
*/
|
|
|
const procProductImg = (product, gender) => {
|
|
|
const _procProductImg = (product, gender) => {
|
|
|
if (gender === '2,3') {
|
|
|
return product.cover2 || product.cover1 || product.imagesUrl || '';
|
|
|
}
|
...
|
...
|
@@ -20,6 +22,7 @@ const procProductImg = (product, gender) => { |
|
|
return product.cover1 || product.cover2 || product.imagesUrl || '';
|
|
|
};
|
|
|
|
|
|
const procProductImg = (product, gender) => fixQuality(_procProductImg(product, gender));
|
|
|
|
|
|
/**
|
|
|
* 处理列表大图周边小图数据,拼接添加 href
|
...
|
...
|
@@ -161,6 +164,10 @@ exports.processProductList = (list, options) => { |
|
|
}
|
|
|
}
|
|
|
|
|
|
_.get(product, 'goodsList', []).forEach((goods) => {
|
|
|
console.log(goods);
|
|
|
});
|
|
|
|
|
|
pruductList.push(product);
|
|
|
});
|
|
|
return handleGoodsListData(pruductList);
|
...
|
...
|
|