|
@@ -215,11 +215,12 @@ exports.processProductList = (list, options) => { |
|
@@ -215,11 +215,12 @@ exports.processProductList = (list, options) => { |
215
|
let tags = [];
|
215
|
let tags = [];
|
216
|
|
216
|
|
217
|
_.get(product, 'tags', []).forEach((value) => {
|
217
|
_.get(product, 'tags', []).forEach((value) => {
|
218
|
- let tag = {};
|
218
|
+ let tag = {},
|
|
|
219
|
+ isfew = {};
|
219
|
|
220
|
|
220
|
switch (value) {
|
221
|
switch (value) {
|
221
|
case 'is_soon_sold_out': // 即将售磬
|
222
|
case 'is_soon_sold_out': // 即将售磬
|
222
|
- options.showFew && (tag.is_few = true);
|
223
|
+ options.showFew && (tag.is_few = true, isfew = true);
|
223
|
break;
|
224
|
break;
|
224
|
case 'is_new': // 新品NEW
|
225
|
case 'is_new': // 新品NEW
|
225
|
options.showNew && (tag.is_new = true);
|
226
|
options.showNew && (tag.is_new = true);
|
|
@@ -250,7 +251,7 @@ exports.processProductList = (list, options) => { |
|
@@ -250,7 +251,7 @@ exports.processProductList = (list, options) => { |
250
|
}
|
251
|
}
|
251
|
tags.push(tag);
|
252
|
tags.push(tag);
|
252
|
product.tags = tags;
|
253
|
product.tags = tags;
|
253
|
- product.is_few = tag.is_few;
|
254
|
+ product.is_few = isfew;
|
254
|
});
|
255
|
});
|
255
|
}
|
256
|
}
|
256
|
if (options.query && _.isString(product.product_name)) {
|
257
|
if (options.query && _.isString(product.product_name)) {
|