...
|
...
|
@@ -297,7 +297,8 @@ exports.processFilter = (list, options) => { |
|
|
|
|
|
// 处理单个商品
|
|
|
exports.processProduct = (productData, options) => {
|
|
|
let result = {};
|
|
|
let result = {},
|
|
|
flag = false;
|
|
|
|
|
|
options = Object.assign({
|
|
|
showTags: true,
|
...
|
...
|
@@ -322,10 +323,11 @@ exports.processProduct = (productData, options) => { |
|
|
_.forEach(productData.goods_list, item => {
|
|
|
if (item.is_default === 'Y') {
|
|
|
productData.default_images = procProductImgs(item, options.gender);
|
|
|
flag = true;
|
|
|
}
|
|
|
});
|
|
|
|
|
|
if (!productData.default_images) {
|
|
|
if (!flag) {
|
|
|
productData.default_images = procProductImgs(productData.goods_list[0], options.gender);
|
|
|
}
|
|
|
|
...
|
...
|
|