...
|
...
|
@@ -215,11 +215,12 @@ exports.processProductList = (list, options) => { |
|
|
let tags = [];
|
|
|
|
|
|
_.get(product, 'tags', []).forEach((value) => {
|
|
|
let tag = {};
|
|
|
let tag = {},
|
|
|
isfew = {};
|
|
|
|
|
|
switch (value) {
|
|
|
case 'is_soon_sold_out': // 即将售磬
|
|
|
options.showFew && (tag.is_few = true);
|
|
|
options.showFew && (tag.is_few = true, isfew = true);
|
|
|
break;
|
|
|
case 'is_new': // 新品NEW
|
|
|
options.showNew && (tag.is_new = true);
|
...
|
...
|
@@ -250,7 +251,7 @@ exports.processProductList = (list, options) => { |
|
|
}
|
|
|
tags.push(tag);
|
|
|
product.tags = tags;
|
|
|
product.is_few = tag.is_few;
|
|
|
product.is_few = isfew;
|
|
|
});
|
|
|
}
|
|
|
if (options.query && _.isString(product.product_name)) {
|
...
|
...
|
|