@pisell/pisellos 1.0.14 → 1.0.15
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.
|
@@ -401,7 +401,7 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
401
401
|
var isNeedSplit = (selectedDiscount.tag || selectedDiscount.type) === 'good_pass';
|
|
402
402
|
|
|
403
403
|
// 需要拆分出来的数量
|
|
404
|
-
var splitCount = isNeedSplit ? Math.min(product.quantity, applicableDiscounts.filter(function (item) {
|
|
404
|
+
var splitCount = isNeedSplit ? Math.min(product.quantity || product.num || 1, applicableDiscounts.filter(function (item) {
|
|
405
405
|
return (item.tag || item.type) === 'good_pass';
|
|
406
406
|
}).length) : 1;
|
|
407
407
|
var arr = [];
|
|
@@ -279,7 +279,7 @@ var RulesModule = class extends import_BaseModule.BaseModule {
|
|
|
279
279
|
return;
|
|
280
280
|
}
|
|
281
281
|
const isNeedSplit = (selectedDiscount.tag || selectedDiscount.type) === "good_pass";
|
|
282
|
-
const splitCount = isNeedSplit ? Math.min(product.quantity, applicableDiscounts.filter((item) => (item.tag || item.type) === "good_pass").length) : 1;
|
|
282
|
+
const splitCount = isNeedSplit ? Math.min(product.quantity || product.num || 1, applicableDiscounts.filter((item) => (item.tag || item.type) === "good_pass").length) : 1;
|
|
283
283
|
const arr = [];
|
|
284
284
|
if (splitCount < product.quantity && isNeedSplit) {
|
|
285
285
|
arr.push(this.hooks.setProduct(originProduct, {
|