...
|
...
|
@@ -46,7 +46,7 @@ exports.processProductList = (list, options) => { |
|
|
if (product.marketPrice === product.salesPrice) {
|
|
|
product.marketPrice = false;
|
|
|
} else if (product.marketPrice && product.salesPrice) {
|
|
|
product.discount = (product.salesPrice / product.marketPrice).toFixed(2) * 10;
|
|
|
product.discount = (product.salesPrice / product.marketPrice * 10).toFixed(1);
|
|
|
}
|
|
|
|
|
|
// 判别默认的商品是否将默认的图片URL赋值到skn
|
...
|
...
|
@@ -96,7 +96,7 @@ exports.processProductList = (list, options) => { |
|
|
// APP访问需要加附加的参数
|
|
|
// 备注:如果以后APP的接口太多,可以把这边参数提取出来,变成一个公共的方法来生成,便于以后管理维护
|
|
|
if (options.isApp) {
|
|
|
product.url += `?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":'${product.productId}'}}`; // eslint-disable-line
|
|
|
product.url += `?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":'${product.productId}'}}`; // eslint-disable-line
|
|
|
}
|
|
|
|
|
|
if (options.showTags) {
|
...
|
...
|
@@ -114,7 +114,7 @@ exports.processProductList = (list, options) => { |
|
|
if (product.isSoonSoldOut && product.tags.isDiscount) {
|
|
|
product.tags.isNew = false;
|
|
|
} else if (product.tags.isDiscount &&
|
|
|
(product.tags.isNew || product.tags.isLimited || product.tags.isYohood || product.tags.isAdvance)) {
|
|
|
(product.tags.isNew || product.tags.isLimited || product.tags.isYohood || product.tags.isAdvance)) {
|
|
|
// 打折与其它组合则隐藏打折
|
|
|
product.tags.isDiscount = false;
|
|
|
} else if (product.tags.isYohood && product.tags.isNew) {
|
...
|
...
|
|