@pisell/pisellos 0.0.299 → 0.0.300

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.
@@ -1669,15 +1669,17 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
1669
1669
  updateParams = {
1670
1670
  is_deposit: newDepositValue
1671
1671
  }; // 如果从定金改为全款,可以清空定金金额
1672
- if (isDeposit === 0 && this.store.currentOrder.deposit_amount !== '0.00') {
1673
- updateParams.deposit_amount = '0.00';
1674
- this.logInfo('订单从定金改为全款,清空定金金额');
1675
- }
1676
-
1672
+ // if (
1673
+ // isDeposit === 0 &&
1674
+ // this.store.currentOrder.deposit_amount !== '0.00'
1675
+ // ) {
1676
+ // updateParams.deposit_amount = '0.00';
1677
+ // this.logInfo('订单从定金改为全款,清空定金金额');
1678
+ // }
1677
1679
  // 调用 Payment 模块更新订单
1678
- _context19.next = 14;
1680
+ _context19.next = 13;
1679
1681
  return this.payment.updateOrderAsync(this.store.currentOrder.uuid, updateParams);
1680
- case 14:
1682
+ case 13:
1681
1683
  // 更新本地缓存的订单对象
1682
1684
  this.store.currentOrder = _objectSpread(_objectSpread({}, this.store.currentOrder), updateParams);
1683
1685
 
@@ -1688,31 +1690,31 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
1688
1690
  this.updateStateAmountToRemaining();
1689
1691
 
1690
1692
  // 触发订单更新事件
1691
- _context19.next = 19;
1693
+ _context19.next = 18;
1692
1694
  return this.core.effects.emit(CheckoutHooks.OnOrderCreated, {
1693
1695
  order: this.store.currentOrder,
1694
1696
  timestamp: Date.now()
1695
1697
  });
1696
- case 19:
1698
+ case 18:
1697
1699
  this.logInfo('订单定金状态更新成功:', {
1698
1700
  isDeposit: newDepositValue,
1699
1701
  depositAmount: this.store.currentOrder.deposit_amount
1700
1702
  });
1701
- _context19.next = 28;
1703
+ _context19.next = 27;
1702
1704
  break;
1703
- case 22:
1704
- _context19.prev = 22;
1705
+ case 21:
1706
+ _context19.prev = 21;
1705
1707
  _context19.t0 = _context19["catch"](0);
1706
1708
  this.logError('更新订单定金状态失败:', _context19.t0);
1707
- _context19.next = 27;
1709
+ _context19.next = 26;
1708
1710
  return this.handleError(_context19.t0, CheckoutErrorType.ValidationFailed);
1709
- case 27:
1711
+ case 26:
1710
1712
  throw _context19.t0;
1711
- case 28:
1713
+ case 27:
1712
1714
  case "end":
1713
1715
  return _context19.stop();
1714
1716
  }
1715
- }, _callee19, this, [[0, 22]]);
1717
+ }, _callee19, this, [[0, 21]]);
1716
1718
  }));
1717
1719
  function updateOrderDepositStatusAsync(_x18) {
1718
1720
  return _updateOrderDepositStatusAsync.apply(this, arguments);
@@ -488,6 +488,7 @@ export var ShopDiscountImpl = /*#__PURE__*/function (_BaseModule) {
488
488
  discount.tag = discount.type;
489
489
  }
490
490
  editModeDiscountList.push(_objectSpread(_objectSpread({}, discount), {}, {
491
+ name: discount.name || discount.discount.title.auto,
491
492
  isEditMode: true,
492
493
  limited_relation_product_data: {},
493
494
  savedAmount: discount.amount * ((product === null || product === void 0 ? void 0 : product.num) || 1),
@@ -1081,10 +1081,6 @@ var CheckoutImpl = class extends import_BaseModule.BaseModule {
1081
1081
  const updateParams = {
1082
1082
  is_deposit: newDepositValue
1083
1083
  };
1084
- if (isDeposit === 0 && this.store.currentOrder.deposit_amount !== "0.00") {
1085
- updateParams.deposit_amount = "0.00";
1086
- this.logInfo("订单从定金改为全款,清空定金金额");
1087
- }
1088
1084
  await this.payment.updateOrderAsync(
1089
1085
  this.store.currentOrder.uuid,
1090
1086
  updateParams
@@ -324,6 +324,7 @@ var ShopDiscountImpl = class extends import_BaseModule.BaseModule {
324
324
  }
325
325
  editModeDiscountList.push({
326
326
  ...discount,
327
+ name: discount.name || discount.discount.title.auto,
327
328
  isEditMode: true,
328
329
  limited_relation_product_data: {},
329
330
  savedAmount: discount.amount * ((product == null ? void 0 : product.num) || 1),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "0.0.299",
4
+ "version": "0.0.300",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",