@pisell/pisellos 1.0.81 → 1.0.82

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.
@@ -269,7 +269,7 @@ export var DiscountModule = /*#__PURE__*/function (_BaseModule) {
269
269
  if (discount.appliedProductDetails) {
270
270
  return discount.appliedProductDetails.reduce(function (total, product) {
271
271
  var _product$discount;
272
- var price = new Decimal((product === null || product === void 0 || (_product$discount = product.discount) === null || _product$discount === void 0 ? void 0 : _product$discount.fixed_amount) * product._num);
272
+ var price = new Decimal((product === null || product === void 0 || (_product$discount = product.discount) === null || _product$discount === void 0 ? void 0 : _product$discount.fixed_amount) || 0).mul((product === null || product === void 0 ? void 0 : product._num) || 1);
273
273
  return new Decimal(total).plus(price).toNumber();
274
274
  }, 0);
275
275
  }
@@ -787,6 +787,7 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
787
787
  amount: product.origin_total,
788
788
  type: 'good_pass',
789
789
  discount: {
790
+ fixed_amount: product.origin_total,
790
791
  resource_id: _selectedDiscount2.id,
791
792
  title: _selectedDiscount2.format_title,
792
793
  original_amount: product.origin_total,
@@ -164,7 +164,7 @@ var DiscountModule = class extends import_BaseModule.BaseModule {
164
164
  if (discount.appliedProductDetails) {
165
165
  return discount.appliedProductDetails.reduce((total, product) => {
166
166
  var _a;
167
- const price = new import_decimal.default(((_a = product == null ? void 0 : product.discount) == null ? void 0 : _a.fixed_amount) * product._num);
167
+ const price = new import_decimal.default(((_a = product == null ? void 0 : product.discount) == null ? void 0 : _a.fixed_amount) || 0).mul((product == null ? void 0 : product._num) || 1);
168
168
  return new import_decimal.default(total).plus(price).toNumber();
169
169
  }, 0);
170
170
  }
@@ -567,6 +567,7 @@ var RulesModule = class extends import_BaseModule.BaseModule {
567
567
  amount: product.origin_total,
568
568
  type: "good_pass",
569
569
  discount: {
570
+ fixed_amount: product.origin_total,
570
571
  resource_id: selectedDiscount2.id,
571
572
  title: selectedDiscount2.format_title,
572
573
  original_amount: product.origin_total,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "1.0.81",
4
+ "version": "1.0.82",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",