@pisell/pisellos 0.0.296 → 0.0.298

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.
@@ -483,9 +483,10 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
483
483
  hasDeposit: false
484
484
  };
485
485
  bookings === null || bookings === void 0 || bookings.forEach(function (item) {
486
+ var total = item.product.calculated_selling_price;
486
487
  var deposit = getProductDeposit({
487
488
  cartItem: {
488
- total: item.product.price * (item.product.num || 1)
489
+ total: total
489
490
  },
490
491
  product: item.product,
491
492
  bundle: item.bundle,
@@ -494,11 +495,6 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
494
495
  });
495
496
  item.deposit = deposit;
496
497
  if (deposit !== null && deposit !== void 0 && deposit.total && Number(deposit.total) > 0) {
497
- // 需要减去商品券折扣卡抵扣的金额
498
- summaryDeposit.total = new Decimal(summaryDeposit.total).plus(deposit.total).toNumber();
499
- item.product.discount_list.forEach(function (discount) {
500
- summaryDeposit.total = new Decimal(summaryDeposit.total).minus(discount.amount || 0).toNumber();
501
- });
502
498
  summaryDeposit.protocols = summaryDeposit.protocols.concat(deposit.protocols);
503
499
  summaryDeposit.hasDeposit = true;
504
500
  }
@@ -280,9 +280,10 @@ var CheckoutImpl = class extends import_BaseModule.BaseModule {
280
280
  hasDeposit: false
281
281
  };
282
282
  bookings == null ? void 0 : bookings.forEach((item) => {
283
+ const total = item.product.calculated_selling_price;
283
284
  const deposit = (0, import_utils2.getProductDeposit)({
284
285
  cartItem: {
285
- total: item.product.price * (item.product.num || 1)
286
+ total
286
287
  },
287
288
  product: item.product,
288
289
  bundle: item.bundle,
@@ -291,10 +292,6 @@ var CheckoutImpl = class extends import_BaseModule.BaseModule {
291
292
  });
292
293
  item.deposit = deposit;
293
294
  if ((deposit == null ? void 0 : deposit.total) && Number(deposit.total) > 0) {
294
- summaryDeposit.total = new import_decimal.default(summaryDeposit.total).plus(deposit.total).toNumber();
295
- item.product.discount_list.forEach((discount) => {
296
- summaryDeposit.total = new import_decimal.default(summaryDeposit.total).minus(discount.amount || 0).toNumber();
297
- });
298
295
  summaryDeposit.protocols = summaryDeposit.protocols.concat(
299
296
  deposit.protocols
300
297
  );
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "0.0.296",
4
+ "version": "0.0.298",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",