@pisell/pisellos 0.0.392 → 0.0.393
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -746,15 +746,12 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
746
746
|
|
|
747
747
|
// 如果商品价格为 0,其实不需要使用任何优惠券,直接 return true
|
|
748
748
|
// 商品券时主商品价格为0不可用
|
|
749
|
-
if ((Number(product.price) <= 0 || !product.price) && !((_product$discount_lis3 = product.discount_list) !== null && _product$discount_lis3 !== void 0 && _product$discount_lis3.
|
|
750
|
-
var _n$discount;
|
|
751
|
-
return ((_n$discount = n.discount) === null || _n$discount === void 0 ? void 0 : _n$discount.resource_id) === discount.id;
|
|
752
|
-
})) && (discount.tag || discount.type) === 'good_pass') return false;
|
|
749
|
+
if ((Number(product.price) <= 0 || !product.price) && !((_product$discount_lis3 = product.discount_list) !== null && _product$discount_lis3 !== void 0 && _product$discount_lis3.length) && (discount.tag || discount.type) === 'good_pass') return false;
|
|
753
750
|
|
|
754
751
|
// 折扣卡商品价格为0时不可用
|
|
755
752
|
if ((Number(product.price) <= 0 || !product.price) && !((_product$discount_lis4 = product.discount_list) !== null && _product$discount_lis4 !== void 0 && _product$discount_lis4.find(function (n) {
|
|
756
|
-
var _n$
|
|
757
|
-
return ((_n$
|
|
753
|
+
var _n$discount;
|
|
754
|
+
return ((_n$discount = n.discount) === null || _n$discount === void 0 ? void 0 : _n$discount.resource_id) === discount.id;
|
|
758
755
|
})) && (discount.tag || discount.type) !== 'good_pass') return false;
|
|
759
756
|
// 如果优惠券已被使用,则跳过
|
|
760
757
|
var targetUsedDiscounts = usedDiscounts.get(discount.id);
|
|
@@ -538,10 +538,7 @@ var RulesModule = class extends import_BaseModule.BaseModule {
|
|
|
538
538
|
return false;
|
|
539
539
|
}
|
|
540
540
|
}
|
|
541
|
-
if ((Number(product.price) <= 0 || !product.price) && !((_b2 = product.discount_list) == null ? void 0 : _b2.
|
|
542
|
-
var _a3;
|
|
543
|
-
return ((_a3 = n.discount) == null ? void 0 : _a3.resource_id) === discount.id;
|
|
544
|
-
})) && (discount.tag || discount.type) === "good_pass")
|
|
541
|
+
if ((Number(product.price) <= 0 || !product.price) && !((_b2 = product.discount_list) == null ? void 0 : _b2.length) && (discount.tag || discount.type) === "good_pass")
|
|
545
542
|
return false;
|
|
546
543
|
if ((Number(product.price) <= 0 || !product.price) && !((_c2 = product.discount_list) == null ? void 0 : _c2.find((n) => {
|
|
547
544
|
var _a3;
|