@pisell/private-materials 6.4.42 → 6.4.43

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.
Files changed (188) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +146 -146
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +8 -8
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +8 -8
  11. package/es/components/booking/components/actionButtons/index.js +37 -42
  12. package/es/components/booking/components/actionButtons/index.less +0 -28
  13. package/es/components/booking/components/footer/amount.d.ts +3 -3
  14. package/es/components/booking/components/footer/amount.js +13 -2
  15. package/es/components/booking/components/footer/index.js +168 -68
  16. package/es/components/booking/components/footer/utils.js +62 -33
  17. package/es/components/booking/info/model.js +5 -0
  18. package/es/components/booking/info/service/addService/index.js +2 -1
  19. package/es/components/booking/info2/index.js +42 -2
  20. package/es/components/booking/info2/service/addService/index.js +2 -1
  21. package/es/components/booking/info2/service/editService/index.js +12 -4
  22. package/es/components/checkout/PaymentModal.d.ts +2 -0
  23. package/es/components/checkout/PaymentModal.js +395 -240
  24. package/es/components/checkout/components/AdditionalModule/index.less +1 -1
  25. package/es/components/checkout/components/AmountSummary/index.js +161 -54
  26. package/es/components/checkout/components/CashPaymentModule/index.d.ts +5 -3
  27. package/es/components/checkout/components/CashPaymentModule/index.js +114 -137
  28. package/es/components/checkout/components/CashPaymentModule/index.less +200 -176
  29. package/es/components/checkout/components/PaymentDetailModal/index.js +2 -2
  30. package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +29 -0
  31. package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +210 -0
  32. package/es/components/checkout/components/PaymentOptionsModule/index.d.ts +2 -4
  33. package/es/components/checkout/components/PaymentOptionsModule/index.js +12 -114
  34. package/es/components/checkout/components/PaymentOptionsModule/index.less +29 -0
  35. package/es/components/checkout/components/SavePayLaterHandler/index.js +1 -1
  36. package/es/components/checkout/components/SearchAndClientModule/index.js +40 -39
  37. package/es/components/checkout/components/WalletPassModule/index.js +3 -2
  38. package/es/components/checkout/components/WalletPassModule/utils.js +6 -1
  39. package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
  40. package/es/components/checkout/hooks/useWalletPass.js +2 -0
  41. package/es/components/checkout/index.less +1 -1
  42. package/es/components/checkout/locales.d.ts +33 -0
  43. package/es/components/checkout/locales.js +39 -3
  44. package/es/components/checkout/types.d.ts +1 -0
  45. package/es/components/eftposPay/hooks.d.ts +1 -1
  46. package/es/components/eftposPay/store/index.d.ts +2 -2
  47. package/es/components/shoppingCart/components/Cart/Product.js +143 -71
  48. package/es/components/shoppingCart/components/Cart/index.js +1 -1
  49. package/es/components/shoppingCart/components/Cart/index.less +31 -0
  50. package/es/components/shoppingCart/locales.d.ts +3 -0
  51. package/es/components/shoppingCart/locales.js +12 -3
  52. package/es/components/ticketBooking/utils/index.js +2 -1
  53. package/es/pro/pisellPriceKeyboardPopover/PisellPriceKeyboardPopover.js +1 -1
  54. package/es/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.d.ts +5 -0
  55. package/es/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.js +148 -0
  56. package/es/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.less +23 -0
  57. package/es/pro/pisellSimplePriceKeyboardPopover/index.d.ts +2 -0
  58. package/es/pro/pisellSimplePriceKeyboardPopover/index.js +1 -0
  59. package/es/pro/pisellSimplePriceKeyboardPopover/types.d.ts +33 -0
  60. package/es/pro/pisellSimplePriceKeyboardPopover/types.js +1 -0
  61. package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.d.ts +4 -0
  62. package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +310 -0
  63. package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.d.ts +13 -0
  64. package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.js +349 -0
  65. package/es/pro/priceKeyboard/components/cashKeyboard/index.d.ts +11 -0
  66. package/es/pro/priceKeyboard/components/cashKeyboard/index.js +49 -0
  67. package/es/pro/priceKeyboard/components/cashKeyboard/index.less +103 -0
  68. package/es/pro/priceKeyboard/components/cashKeyboard/locales.d.ts +39 -0
  69. package/es/pro/priceKeyboard/components/cashKeyboard/locales.js +41 -0
  70. package/es/pro/priceKeyboard/components/cashKeyboard/types.d.ts +97 -0
  71. package/es/pro/priceKeyboard/components/cashKeyboard/types.js +1 -0
  72. package/es/pro/priceKeyboard/components/discountKeyboard/index.d.ts +22 -0
  73. package/es/pro/priceKeyboard/components/discountKeyboard/index.js +442 -0
  74. package/es/pro/priceKeyboard/components/discountKeyboard/index.less +47 -0
  75. package/es/pro/priceKeyboard/components/discountKeyboard/locales.d.ts +42 -0
  76. package/es/pro/priceKeyboard/components/discountKeyboard/locales.js +44 -0
  77. package/es/pro/priceKeyboard/components/discountKeyboard/types.d.ts +17 -0
  78. package/es/pro/priceKeyboard/components/discountKeyboard/types.js +1 -0
  79. package/es/pro/priceKeyboard/components/paymentKeyboard/index.d.ts +11 -0
  80. package/es/pro/priceKeyboard/components/paymentKeyboard/index.js +444 -0
  81. package/es/pro/priceKeyboard/components/paymentKeyboard/index.less +64 -0
  82. package/es/pro/priceKeyboard/components/paymentKeyboard/locales.d.ts +45 -0
  83. package/es/pro/priceKeyboard/components/paymentKeyboard/locales.js +47 -0
  84. package/es/pro/priceKeyboard/components/paymentKeyboard/types.d.ts +39 -0
  85. package/es/pro/priceKeyboard/components/paymentKeyboard/types.js +1 -0
  86. package/es/pro/priceKeyboard/components/shortcuts/index.d.ts +17 -0
  87. package/es/pro/priceKeyboard/components/shortcuts/index.js +47 -0
  88. package/es/pro/priceKeyboard/components/shortcuts/index.less +39 -0
  89. package/es/pro/priceKeyboard/hooks/keyActions.d.ts +28 -0
  90. package/es/pro/priceKeyboard/hooks/keyActions.js +252 -0
  91. package/es/pro/priceKeyboard/hooks/rightItems.d.ts +27 -0
  92. package/es/pro/priceKeyboard/hooks/rightItems.js +50 -0
  93. package/es/pro/priceKeyboard/index.d.ts +3 -0
  94. package/es/pro/priceKeyboard/index.js +3 -0
  95. package/es/pro/priceKeyboard/index.less +215 -0
  96. package/es/pro/priceKeyboard/utils.d.ts +31 -0
  97. package/es/pro/priceKeyboard/utils.js +51 -0
  98. package/es/pro/skuDetailModal/index.js +19 -16
  99. package/lib/components/booking/components/actionButtons/index.js +31 -28
  100. package/lib/components/booking/components/actionButtons/index.less +0 -28
  101. package/lib/components/booking/components/footer/amount.d.ts +3 -3
  102. package/lib/components/booking/components/footer/amount.js +10 -4
  103. package/lib/components/booking/components/footer/index.js +107 -40
  104. package/lib/components/booking/components/footer/utils.js +35 -7
  105. package/lib/components/booking/info/model.js +3 -0
  106. package/lib/components/booking/info/service/addService/index.js +2 -1
  107. package/lib/components/booking/info2/index.js +18 -1
  108. package/lib/components/booking/info2/service/addService/index.js +2 -1
  109. package/lib/components/booking/info2/service/editService/index.js +12 -4
  110. package/lib/components/checkout/PaymentModal.d.ts +2 -0
  111. package/lib/components/checkout/PaymentModal.js +152 -73
  112. package/lib/components/checkout/components/AdditionalModule/index.less +1 -1
  113. package/lib/components/checkout/components/AmountSummary/index.js +114 -40
  114. package/lib/components/checkout/components/CashPaymentModule/index.d.ts +5 -3
  115. package/lib/components/checkout/components/CashPaymentModule/index.js +103 -140
  116. package/lib/components/checkout/components/CashPaymentModule/index.less +200 -176
  117. package/lib/components/checkout/components/PaymentDetailModal/index.js +2 -2
  118. package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +29 -0
  119. package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +172 -0
  120. package/lib/components/checkout/components/PaymentOptionsModule/index.d.ts +2 -4
  121. package/lib/components/checkout/components/PaymentOptionsModule/index.js +11 -123
  122. package/lib/components/checkout/components/PaymentOptionsModule/index.less +29 -0
  123. package/lib/components/checkout/components/SavePayLaterHandler/index.js +1 -1
  124. package/lib/components/checkout/components/SearchAndClientModule/index.js +3 -29
  125. package/lib/components/checkout/components/WalletPassModule/index.js +3 -2
  126. package/lib/components/checkout/components/WalletPassModule/utils.js +4 -1
  127. package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
  128. package/lib/components/checkout/hooks/useWalletPass.js +2 -0
  129. package/lib/components/checkout/index.less +1 -1
  130. package/lib/components/checkout/locales.d.ts +33 -0
  131. package/lib/components/checkout/locales.js +39 -3
  132. package/lib/components/checkout/types.d.ts +1 -0
  133. package/lib/components/eftposPay/hooks.d.ts +1 -1
  134. package/lib/components/eftposPay/store/index.d.ts +2 -2
  135. package/lib/components/shoppingCart/components/Cart/Product.js +111 -51
  136. package/lib/components/shoppingCart/components/Cart/index.js +1 -1
  137. package/lib/components/shoppingCart/components/Cart/index.less +31 -0
  138. package/lib/components/shoppingCart/locales.d.ts +3 -0
  139. package/lib/components/shoppingCart/locales.js +6 -3
  140. package/lib/components/ticketBooking/index.js +5 -1
  141. package/lib/components/ticketBooking/utils/index.js +2 -1
  142. package/lib/pro/pisellPriceKeyboardPopover/PisellPriceKeyboardPopover.js +2 -2
  143. package/lib/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.d.ts +5 -0
  144. package/lib/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.js +144 -0
  145. package/lib/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.less +23 -0
  146. package/lib/pro/pisellSimplePriceKeyboardPopover/index.d.ts +2 -0
  147. package/lib/pro/pisellSimplePriceKeyboardPopover/index.js +35 -0
  148. package/lib/pro/pisellSimplePriceKeyboardPopover/types.d.ts +33 -0
  149. package/lib/pro/pisellSimplePriceKeyboardPopover/types.js +17 -0
  150. package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.d.ts +4 -0
  151. package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +332 -0
  152. package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.d.ts +13 -0
  153. package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.js +399 -0
  154. package/lib/pro/priceKeyboard/components/cashKeyboard/index.d.ts +11 -0
  155. package/lib/pro/priceKeyboard/components/cashKeyboard/index.js +76 -0
  156. package/lib/pro/priceKeyboard/components/cashKeyboard/index.less +103 -0
  157. package/lib/pro/priceKeyboard/components/cashKeyboard/locales.d.ts +39 -0
  158. package/lib/pro/priceKeyboard/components/cashKeyboard/locales.js +65 -0
  159. package/lib/pro/priceKeyboard/components/cashKeyboard/types.d.ts +97 -0
  160. package/lib/pro/priceKeyboard/components/cashKeyboard/types.js +17 -0
  161. package/lib/pro/priceKeyboard/components/discountKeyboard/index.d.ts +22 -0
  162. package/lib/pro/priceKeyboard/components/discountKeyboard/index.js +485 -0
  163. package/lib/pro/priceKeyboard/components/discountKeyboard/index.less +47 -0
  164. package/lib/pro/priceKeyboard/components/discountKeyboard/locales.d.ts +42 -0
  165. package/lib/pro/priceKeyboard/components/discountKeyboard/locales.js +68 -0
  166. package/lib/pro/priceKeyboard/components/discountKeyboard/types.d.ts +17 -0
  167. package/lib/pro/priceKeyboard/components/discountKeyboard/types.js +17 -0
  168. package/lib/pro/priceKeyboard/components/paymentKeyboard/index.d.ts +11 -0
  169. package/lib/pro/priceKeyboard/components/paymentKeyboard/index.js +488 -0
  170. package/lib/pro/priceKeyboard/components/paymentKeyboard/index.less +64 -0
  171. package/lib/pro/priceKeyboard/components/paymentKeyboard/locales.d.ts +45 -0
  172. package/lib/pro/priceKeyboard/components/paymentKeyboard/locales.js +71 -0
  173. package/lib/pro/priceKeyboard/components/paymentKeyboard/types.d.ts +39 -0
  174. package/lib/pro/priceKeyboard/components/paymentKeyboard/types.js +17 -0
  175. package/lib/pro/priceKeyboard/components/shortcuts/index.d.ts +17 -0
  176. package/lib/pro/priceKeyboard/components/shortcuts/index.js +79 -0
  177. package/lib/pro/priceKeyboard/components/shortcuts/index.less +39 -0
  178. package/lib/pro/priceKeyboard/hooks/keyActions.d.ts +28 -0
  179. package/lib/pro/priceKeyboard/hooks/keyActions.js +176 -0
  180. package/lib/pro/priceKeyboard/hooks/rightItems.d.ts +27 -0
  181. package/lib/pro/priceKeyboard/hooks/rightItems.js +81 -0
  182. package/lib/pro/priceKeyboard/index.d.ts +3 -0
  183. package/lib/pro/priceKeyboard/index.js +45 -0
  184. package/lib/pro/priceKeyboard/index.less +215 -0
  185. package/lib/pro/priceKeyboard/utils.d.ts +31 -0
  186. package/lib/pro/priceKeyboard/utils.js +75 -0
  187. package/lib/pro/skuDetailModal/index.js +18 -22
  188. package/package.json +4 -4
@@ -0,0 +1,210 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
10
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
11
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
12
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
+ import React, { useState } from 'react';
14
+ import classnames from 'classnames';
15
+ import { formatAmount } from '@pisell/utils';
16
+ import { Iconfont } from '@pisell/materials';
17
+ import { Button, Popover } from 'antd';
18
+ import { PaymentKeyboard } from "../../../../pro/priceKeyboard";
19
+ import "./index.less";
20
+
21
+ // 扩展支付方法接口,添加手续费相关属性
22
+
23
+ var PaymentMethodItem = function PaymentMethodItem(_ref) {
24
+ var method = _ref.method,
25
+ amountSymbol = _ref.amountSymbol,
26
+ customAmount = _ref.customAmount,
27
+ _ref$disabled = _ref.disabled,
28
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled,
29
+ onClick = _ref.onClick,
30
+ getText = _ref.getText;
31
+ // 控制键盘弹窗显示状态
32
+ var _useState = useState(false),
33
+ _useState2 = _slicedToArray(_useState, 2),
34
+ isKeyboardVisible = _useState2[0],
35
+ setIsKeyboardVisible = _useState2[1];
36
+ // 计算Surcharge金额
37
+ var calculateSurcharge = function calculateSurcharge(method) {
38
+ if (!(method !== null && method !== void 0 && method.is_surcharge)) return 0;
39
+ var baseAmount = Number(customAmount) || 0;
40
+ if (Number(method.percentage)) {
41
+ return baseAmount * Number(method.percentage) + Number(method.fixed || 0);
42
+ }
43
+ return Number(method.fixed || 0);
44
+ };
45
+
46
+ // 计算总金额(包含Surcharge)
47
+ var calculateTotalAmount = function calculateTotalAmount(method) {
48
+ var baseAmount = Number(customAmount) || 0;
49
+ var surcharge = calculateSurcharge(method);
50
+ return baseAmount + surcharge;
51
+ };
52
+
53
+ // 处理右侧按钮点击事件
54
+ var handleRightButtonClick = function handleRightButtonClick(e) {
55
+ e.preventDefault();
56
+ // e.stopPropagation(); // 防止事件冒泡到外层按钮
57
+ if (disabled || !onClick) {
58
+ return;
59
+ }
60
+ onClick(_objectSpread(_objectSpread({}, method), {}, {
61
+ surcharge: String(formatAmount(calculateSurcharge(method), 2, amountSymbol))
62
+ }));
63
+ };
64
+
65
+ // 渲染支付图标
66
+ var renderPaymentIcon = function renderPaymentIcon(method) {
67
+ if (method.code === 'EFTPOS') {
68
+ return /*#__PURE__*/React.createElement("div", {
69
+ className: classnames('payment-options-module-icon-container'),
70
+ style: {
71
+ background: '#FE8279'
72
+ }
73
+ }, /*#__PURE__*/React.createElement(Iconfont, {
74
+ type: "pisell2-credit",
75
+ style: {
76
+ fontSize: '26px',
77
+ color: '#ffffff'
78
+ }
79
+ }));
80
+ }
81
+ switch (String(method.type)) {
82
+ case 'credit-card':
83
+ case 'eftpos':
84
+ return /*#__PURE__*/React.createElement("div", {
85
+ className: classnames('payment-options-module-icon-container'),
86
+ style: {
87
+ background: '#FE8279'
88
+ }
89
+ }, /*#__PURE__*/React.createElement(Iconfont, {
90
+ type: "pisell2-credit",
91
+ style: {
92
+ fontSize: '26px',
93
+ color: '#ffffff'
94
+ }
95
+ }));
96
+ default:
97
+ return /*#__PURE__*/React.createElement("div", {
98
+ className: classnames('payment-options-module-icon-container'),
99
+ style: {
100
+ background: '#D277E4'
101
+ }
102
+ }, /*#__PURE__*/React.createElement(Iconfont, {
103
+ type: "pisell2-custom",
104
+ style: {
105
+ fontSize: '26px',
106
+ color: '#ffffff'
107
+ }
108
+ }));
109
+ }
110
+ };
111
+
112
+ // 判断是否为EFTPOS支付方式
113
+ var isEftpos = method.code === 'EFTPOS' || method.type === 'eftpos';
114
+
115
+ // 渲染左侧内容
116
+ var renderLeftContent = function renderLeftContent() {
117
+ return /*#__PURE__*/React.createElement("div", {
118
+ className: classnames('payment-options-module-payment-method-left')
119
+ }, /*#__PURE__*/React.createElement("div", {
120
+ className: classnames('payment-options-module-icon-container')
121
+ }, renderPaymentIcon(method)), /*#__PURE__*/React.createElement("div", {
122
+ className: classnames('payment-options-module-payment-info')
123
+ }, /*#__PURE__*/React.createElement("div", {
124
+ className: classnames('payment-options-module-payment-info-inner')
125
+ }, /*#__PURE__*/React.createElement("div", {
126
+ className: classnames('payment-options-module-payment-name')
127
+ }, method.name), /*#__PURE__*/React.createElement("div", {
128
+ className: classnames('payment-options-module-payment-info-inner-surcharge')
129
+ }, !!(method !== null && method !== void 0 && method.is_surcharge) && calculateSurcharge(method) !== 0 && /*#__PURE__*/React.createElement("div", {
130
+ className: classnames('payment-options-module-surcharge-text')
131
+ }, (getText === null || getText === void 0 ? void 0 : getText('pisell2.payment-options.surcharge-label', 'Surcharge')) || 'Surcharge', ":", formatAmount(calculateSurcharge(method), 2, amountSymbol)), !isEftpos && /*#__PURE__*/React.createElement("div", {
132
+ className: classnames('payment-options-module-surcharge-text'),
133
+ style: {
134
+ cursor: 'pointer'
135
+ }
136
+ }, /*#__PURE__*/React.createElement(Iconfont, {
137
+ type: "pisell2-edit-05",
138
+ style: {
139
+ fontSize: '24px',
140
+ color: disabled ? '#D0D5DD' : '#7F56DA'
141
+ }
142
+ }))))));
143
+ };
144
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("button", {
145
+ className: classnames('payment-options-module-payment-method-item', {
146
+ 'payment-options-module-pointer': !disabled,
147
+ 'payment-options-module-disabled': disabled
148
+ }),
149
+ type: "button",
150
+ disabled: disabled
151
+ }, !isEftpos ? /*#__PURE__*/React.createElement(Popover, {
152
+ content: /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(PaymentKeyboard, {
153
+ paymentOriginalValue: String(customAmount || 0),
154
+ paymentDefaultValue: String(customAmount || 0),
155
+ enableExceedMaxAmount: !isEftpos,
156
+ payment: {
157
+ enable: true
158
+ },
159
+ surcharge: {
160
+ enable: !!(method !== null && method !== void 0 && method.is_surcharge) && calculateSurcharge(method) !== 0
161
+ },
162
+ surchargeDefaultValue: {
163
+ percent: method.percentage ? String(Number(method.percentage) * 100) : '',
164
+ fixed: method.fixed ? String(method.fixed) : ''
165
+ },
166
+ selectType: "light",
167
+ onChange: function onChange(value) {
168
+ console.log(value);
169
+ },
170
+ onPay: function onPay(args) {
171
+ console.log(args);
172
+ // 处理支付逻辑
173
+ setIsKeyboardVisible(false);
174
+ if (onClick) {
175
+ var _args$surcharge, _args$surcharge2;
176
+ onClick(_objectSpread(_objectSpread({}, method), {}, {
177
+ fixed: Number(((_args$surcharge = args.surcharge) === null || _args$surcharge === void 0 ? void 0 : _args$surcharge.fixed) || 0),
178
+ percentage: (_args$surcharge2 = args.surcharge) !== null && _args$surcharge2 !== void 0 && _args$surcharge2.percent ? Number(args.surcharge.percent) / 100 : 0,
179
+ totalAmount: String(formatAmount(args.amount, 2))
180
+ }));
181
+ }
182
+ }
183
+ })),
184
+ trigger: "click",
185
+ open: isKeyboardVisible,
186
+ onOpenChange: setIsKeyboardVisible,
187
+ placement: "bottom",
188
+ overlayClassName: "payment-keyboard-popover",
189
+ arrow: true,
190
+ destroyTooltipOnHide: true
191
+ }, /*#__PURE__*/React.createElement("div", null, renderLeftContent())) : renderLeftContent(), /*#__PURE__*/React.createElement("div", {
192
+ className: classnames('payment-options-module-payment-method-right'),
193
+ onClick: handleRightButtonClick
194
+ },
195
+ // 右侧按钮,如果是eftpos,则显示Pay按钮
196
+ isEftpos ? /*#__PURE__*/React.createElement(Button, {
197
+ type: "primary",
198
+ className: classnames('payment-options-module-pay-button'),
199
+ disabled: disabled
200
+ }, getText === null || getText === void 0 ? void 0 : getText('pay', 'Pay')) : /*#__PURE__*/React.createElement("div", {
201
+ className: classnames('payment-options-module-selection-button')
202
+ }, /*#__PURE__*/React.createElement(Iconfont, {
203
+ type: "pisell2-a-arrow-circle-right2",
204
+ style: {
205
+ fontSize: '30px',
206
+ color: disabled ? '#D0D5DD' : '#7F56DA'
207
+ }
208
+ })))));
209
+ };
210
+ export default PaymentMethodItem;
@@ -1,9 +1,7 @@
1
1
  /// <reference types="react" />
2
- import { PaymentOptionsModuleProps, PaymentMethod } from '../../types';
2
+ import { ExtendedPaymentMethod } from './PaymentMethodItem';
3
+ import { PaymentOptionsModuleProps } from '../../types';
3
4
  import './index.less';
4
- interface ExtendedPaymentMethod extends PaymentMethod {
5
- is_surcharge?: boolean;
6
- }
7
5
  interface ExtendedPaymentOptionsModuleProps extends PaymentOptionsModuleProps {
8
6
  amountSymbol?: string;
9
7
  paymentMethods?: ExtendedPaymentMethod[];
@@ -1,21 +1,13 @@
1
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
1
  import ScrollableList from "../ScrollableList/index";
2
+ import PaymentMethodItem from "./PaymentMethodItem";
8
3
  import React from 'react';
9
4
  import classnames from 'classnames';
10
5
  import "./index.less";
11
- import { formatAmount, locales } from '@pisell/utils';
12
- import { Iconfont } from '@pisell/materials';
6
+ import { locales } from '@pisell/utils';
13
7
  import { useDebounceFn } from 'ahooks';
14
8
  import useEngineContext from "../../../../hooks/useEngineContext";
15
9
  import checkoutLocales from "../../locales";
16
10
 
17
- // 扩展支付方法接口,添加手续费相关属性
18
-
19
11
  // 扩展 PaymentOptionsModule Props 接口
20
12
 
21
13
  var SHOW_METHODS_CODE = ['EFTPOS_LINKLY', 'EFTPOS', 'EFTPOS_TYRO', 'EFTPOS_WINDCAVE', 'EFTPOS_PAYO'];
@@ -56,82 +48,18 @@ function PaymentOptionsModule(_ref) {
56
48
  return !(item.type === 'app' && item.code === 'EFTPOS_LINKLY') && (['custom'].includes(item.type) || SHOW_METHODS_CODE.includes(item.code));
57
49
  });
58
50
 
59
- // 计算Surcharge金额
60
- var calculateSurcharge = function calculateSurcharge(method) {
61
- if (!(method !== null && method !== void 0 && method.is_surcharge)) return 0;
62
- var baseAmount = Number(customAmount) || 0;
63
- if (Number(method.percentage)) {
64
- return baseAmount * Number(method.percentage) + Number(method.fixed || 0);
65
- }
66
- return Number(method.fixed || 0);
67
- };
68
-
69
- // 计算总金额(包含Surcharge)
70
- var calculateTotalAmount = function calculateTotalAmount(method) {
71
- var baseAmount = Number(customAmount) || 0;
72
- var surcharge = calculateSurcharge(method);
73
- return baseAmount + surcharge;
74
- };
75
-
76
51
  // 防抖处理支付方式点击
77
52
  var _useDebounceFn = useDebounceFn(function (method) {
78
53
  if (disabled) {
79
54
  return;
80
55
  }
81
56
  if (typeof onClick === 'function') {
82
- onClick(_objectSpread(_objectSpread({}, method), {}, {
83
- surcharge: String(formatAmount(calculateSurcharge(method), 2, amountSymbol))
84
- }));
57
+ onClick(method);
85
58
  }
86
59
  }, {
87
60
  wait: 500 // 500ms 防抖延迟
88
61
  }),
89
62
  handlePaymentClick = _useDebounceFn.run;
90
- var renderPaymentIcon = function renderPaymentIcon(method) {
91
- if (method.code === 'EFTPOS') {
92
- return /*#__PURE__*/React.createElement("div", {
93
- className: classnames('payment-options-module-icon-container'),
94
- style: {
95
- background: '#FE8279'
96
- }
97
- }, /*#__PURE__*/React.createElement(Iconfont, {
98
- type: "pisell2-credit",
99
- style: {
100
- fontSize: '26px',
101
- color: '#ffffff'
102
- }
103
- }));
104
- }
105
- switch (String(method.type)) {
106
- case 'credit-card':
107
- case 'eftpos':
108
- return /*#__PURE__*/React.createElement("div", {
109
- className: classnames('payment-options-module-icon-container'),
110
- style: {
111
- background: '#FE8279'
112
- }
113
- }, /*#__PURE__*/React.createElement(Iconfont, {
114
- type: "pisell2-credit",
115
- style: {
116
- fontSize: '26px',
117
- color: '#ffffff'
118
- }
119
- }));
120
- default:
121
- return /*#__PURE__*/React.createElement("div", {
122
- className: classnames('payment-options-module-icon-container'),
123
- style: {
124
- background: '#D277E4'
125
- }
126
- }, /*#__PURE__*/React.createElement(Iconfont, {
127
- type: "pisell2-custom",
128
- style: {
129
- fontSize: '26px',
130
- color: '#ffffff'
131
- }
132
- }));
133
- }
134
- };
135
63
  return /*#__PURE__*/React.createElement("div", {
136
64
  className: classnames('payment-options-module', {
137
65
  'payment-options-module-disabled': disabled
@@ -143,7 +71,7 @@ function PaymentOptionsModule(_ref) {
143
71
  }, /*#__PURE__*/React.createElement(ScrollableList, {
144
72
  height: "100%" // 占满剩余空间
145
73
  ,
146
- maxHeight: 330,
74
+ maxHeight: 314,
147
75
  gradientColor: "rgba(139, 92, 246, 0.1)",
148
76
  gradientHeight: 50,
149
77
  columnCount: showCashPayment ? 1 : 2,
@@ -160,45 +88,15 @@ function PaymentOptionsModule(_ref) {
160
88
  paddingBottom: 8
161
89
  }
162
90
  }, filteredPaymentMethods.map(function (method) {
163
- return /*#__PURE__*/React.createElement("button", {
91
+ return /*#__PURE__*/React.createElement(PaymentMethodItem, {
164
92
  key: method.id,
165
- onClick: function onClick(e) {
166
- e.preventDefault();
167
- handlePaymentClick(method);
168
- },
169
- className: classnames('payment-options-module-payment-method-item', {
170
- 'payment-options-module-pointer': !disabled,
171
- 'payment-options-module-disabled': disabled
172
- }),
173
- type: "button",
174
- disabled: disabled
175
- }, /*#__PURE__*/React.createElement("div", {
176
- className: classnames('payment-options-module-payment-method-left')
177
- }, /*#__PURE__*/React.createElement("div", {
178
- className: classnames('payment-options-module-icon-container')
179
- }, renderPaymentIcon(method)), /*#__PURE__*/React.createElement("div", {
180
- className: classnames('payment-options-module-payment-info')
181
- }, /*#__PURE__*/React.createElement("div", {
182
- className: classnames('payment-options-module-payment-info-inner')
183
- }, /*#__PURE__*/React.createElement("div", {
184
- className: classnames('payment-options-module-payment-name')
185
- }, method.name), !!(method !== null && method !== void 0 && method.is_surcharge) && calculateSurcharge(method) !== 0 && /*#__PURE__*/React.createElement("div", {
186
- className: classnames('payment-options-module-surcharge-text')
187
- }, getText('pisell2.payment-options.surcharge-label', 'Surcharge'), ":", formatAmount(calculateSurcharge(method), 2, amountSymbol))))), /*#__PURE__*/React.createElement("div", {
188
- className: classnames('payment-options-module-payment-method-right')
189
- }, method.code !== 'EFTPOS' && method.type !== 'eftpos' && /*#__PURE__*/React.createElement("div", {
190
- className: classnames('payment-options-module-amount', 'payment-options-module-theme-color')
191
- }, formatAmount(calculateTotalAmount(method), 2, amountSymbol)), /*#__PURE__*/React.createElement("div", {
192
- className: classnames('payment-options-module-selection-button', {
193
- 'payment-options-module-selection-button-disabled': disabled
194
- })
195
- }, /*#__PURE__*/React.createElement(Iconfont, {
196
- type: "pisell2-a-arrow-circle-right2",
197
- style: {
198
- fontSize: '30px',
199
- color: '#7F56DA'
200
- }
201
- }))));
93
+ method: method,
94
+ amountSymbol: amountSymbol,
95
+ customAmount: customAmount,
96
+ disabled: disabled,
97
+ onClick: handlePaymentClick,
98
+ getText: getText
99
+ });
202
100
  }))));
203
101
  }
204
102
  export default PaymentOptionsModule;
@@ -44,6 +44,7 @@
44
44
  align-items: center;
45
45
  display: flex;
46
46
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
47
+ gap: 12px;
47
48
  }
48
49
 
49
50
 
@@ -94,6 +95,14 @@
94
95
  align-items: center;
95
96
  gap: 8px;
96
97
  display: flex;
98
+ flex: 1;
99
+ background: none;
100
+ border: none;
101
+ cursor: pointer;
102
+ padding: 0;
103
+ margin: 0;
104
+ outline: none;
105
+ box-shadow: none;
97
106
  }
98
107
 
99
108
 
@@ -224,6 +233,20 @@
224
233
  cursor: pointer;
225
234
  }
226
235
 
236
+ .payment-options-module-pay-button{
237
+ background: var(--theme-color, #7F56DA);
238
+ &:disabled {
239
+ background: #D0D5DD;
240
+ color: #fff;
241
+ }
242
+ }
243
+
244
+ .payment-options-module-payment-info-inner-surcharge{
245
+ display: flex;
246
+ align-items: center;
247
+ gap: 8px;
248
+ }
249
+
227
250
  /* Disabled state styles */
228
251
  .payment-options-module-disabled {
229
252
  cursor: unset !important;
@@ -258,3 +281,9 @@
258
281
  /* 标题保持正常颜色 */
259
282
  }
260
283
  }
284
+
285
+ .payment-keyboard-popover {
286
+ .pisell-lowcode-popover-inner{
287
+ padding: 0;
288
+ }
289
+ }
@@ -89,7 +89,7 @@ var SavePayLaterHandler = /*#__PURE__*/forwardRef(function (_ref, ref) {
89
89
  mask: true,
90
90
  maskClosable: false,
91
91
  centered: true,
92
- width: 500,
92
+ width: 530,
93
93
  title: getText('pisell2.checkout.wallet-balance-confirm.title'),
94
94
  footer: null,
95
95
  className: "wallet-balance-confirm-modal",
@@ -40,12 +40,12 @@ var SearchAndClientModule = function SearchAndClientModule(props) {
40
40
  var bookingTicket = useBookingTicket();
41
41
  var handleSearch = useDebounceFn( /*#__PURE__*/function () {
42
42
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(keyword) {
43
- var res, _Toast$info, _clientCardRef$curren, _clientCardRef$curren2, _Toast$info2, _res$data, customer, rest, _Toast$info3, _customer;
43
+ var res, _Toast$info, _clientCardRef$curren, _clientCardRef$curren2, _res$data, customer, rest, _Toast$info2, _customer;
44
44
  return _regeneratorRuntime().wrap(function _callee$(_context) {
45
45
  while (1) switch (_context.prev = _context.next) {
46
46
  case 0:
47
47
  if (!keyword) {
48
- _context.next = 27;
48
+ _context.next = 24;
49
49
  break;
50
50
  }
51
51
  setLoading(true);
@@ -62,46 +62,47 @@ var SearchAndClientModule = function SearchAndClientModule(props) {
62
62
  return _context.abrupt("return");
63
63
  case 9:
64
64
  if (!('type' in res && res.type == 'walletCode')) {
65
- _context.next = 19;
65
+ _context.next = 16;
66
66
  break;
67
67
  }
68
- if (!disabledSwitch) {
69
- _context.next = 13;
70
- break;
71
- }
72
- Toast === null || Toast === void 0 || (_Toast$info2 = Toast.info) === null || _Toast$info2 === void 0 || _Toast$info2.call(Toast, locales.getText('pisell2.checkout.client-card.tip.partially-paid'));
73
- return _context.abrupt("return");
74
- case 13:
68
+ // if (disabledSwitch) {
69
+ // Toast?.info?.(
70
+ // locales.getText(
71
+ // 'pisell2.checkout.client-card.tip.partially-paid'
72
+ // )
73
+ // );
74
+ // return;
75
+ // }
75
76
  _res$data = res.data, customer = _res$data.customer, rest = _objectWithoutProperties(_res$data, _excluded); // todo 无绑定client
76
77
  if (customer) {
77
- _context.next = 17;
78
+ _context.next = 14;
78
79
  break;
79
80
  }
80
- Toast === null || Toast === void 0 || (_Toast$info3 = Toast.info) === null || _Toast$info3 === void 0 || _Toast$info3.call(Toast, locales.getText('pisell2.checkout.wallet-pass-module.no-result'));
81
+ Toast === null || Toast === void 0 || (_Toast$info2 = Toast.info) === null || _Toast$info2 === void 0 || _Toast$info2.call(Toast, locales.getText('pisell2.checkout.wallet-pass-module.no-result'));
81
82
  return _context.abrupt("return");
82
- case 17:
83
+ case 14:
83
84
  _customer = _objectSpread(_objectSpread({}, customer), {}, {
84
85
  latest_wallet_detail: rest
85
86
  }); // @ts-ignore
86
87
  (_clientCardRef$curren = clientCardRef.current) === null || _clientCardRef$curren === void 0 || (_clientCardRef$curren2 = _clientCardRef$curren.handleSetClient) === null || _clientCardRef$curren2 === void 0 || _clientCardRef$curren2.call(_clientCardRef$curren, _customer, {
87
88
  sameClientTip: locales.getText('pisell2.checkout.client-card.tip.same-client')
88
89
  });
89
- case 19:
90
+ case 16:
90
91
  setValue('');
91
- _context.next = 24;
92
+ _context.next = 21;
92
93
  break;
93
- case 22:
94
- _context.prev = 22;
94
+ case 19:
95
+ _context.prev = 19;
95
96
  _context.t0 = _context["catch"](2);
96
- case 24:
97
- _context.prev = 24;
97
+ case 21:
98
+ _context.prev = 21;
98
99
  setLoading(false);
99
- return _context.finish(24);
100
- case 27:
100
+ return _context.finish(21);
101
+ case 24:
101
102
  case "end":
102
103
  return _context.stop();
103
104
  }
104
- }, _callee, null, [[2, 22, 24, 27]]);
105
+ }, _callee, null, [[2, 19, 21, 24]]);
105
106
  }));
106
107
  return function (_x) {
107
108
  return _ref.apply(this, arguments);
@@ -150,23 +151,23 @@ var SearchAndClientModule = function SearchAndClientModule(props) {
150
151
  size: 'default'
151
152
  }
152
153
  };
153
- if (disabledSwitch === true) {
154
- _props = {
155
- open: false,
156
- buttonProps: {
157
- icon: icon,
158
- size: 'default',
159
- onClick: function onClick() {
160
- var _Toast$info4;
161
- // todo 根据当前订单付款情况判断是否可以切换
162
- Toast === null || Toast === void 0 || (_Toast$info4 = Toast.info) === null || _Toast$info4 === void 0 || _Toast$info4.call(Toast, locales.getText('pisell2.checkout.client-card.tip.partially-paid'));
163
- },
164
- style: {
165
- cursor: 'not-allowed'
166
- }
167
- }
168
- };
169
- }
154
+ // if (disabledSwitch === true) {
155
+ // _props = {
156
+ // open: false,
157
+ // buttonProps: {
158
+ // icon,
159
+ // size: 'default',
160
+ // onClick: () => {
161
+ // // todo 根据当前订单付款情况判断是否可以切换
162
+ // Toast?.info?.(
163
+ // locales.getText('pisell2.checkout.client-card.tip.partially-paid')
164
+ // );
165
+ // },
166
+ // style: { cursor: 'not-allowed' },
167
+ // },
168
+ // };
169
+ // }
170
+
170
171
  return _props;
171
172
  }, [Toast, disabledSwitch]);
172
173
  return /*#__PURE__*/React.createElement("div", {
@@ -128,10 +128,11 @@ var WalletPassModule = /*#__PURE__*/forwardRef(function (props, ref) {
128
128
  return selectedWalletIds.length + selectedDiscountList.length;
129
129
  }, [selectedWalletIds.length, selectedDiscountList.length]);
130
130
  var discountDisabled = useMemo(function () {
131
+ if (Number(orderInfo === null || orderInfo === void 0 ? void 0 : orderInfo.totalAmount) === 0) return true;
131
132
  return !!(paymentItems !== null && paymentItems !== void 0 && paymentItems.some(function (item) {
132
- return !WALLET_PASS_CODE_ARRAY.includes(item.code);
133
+ return !WALLET_PASS_CODE_ARRAY.includes(item.code) && !item.isSynced;
133
134
  }));
134
- }, [paymentItems]);
135
+ }, [paymentItems, orderInfo]);
135
136
  if (cardData.length === 0 && availableDiscountList.length === 0) {
136
137
  return null;
137
138
  }
@@ -85,6 +85,11 @@ export var formatDiscountWalletData = function formatDiscountWalletData(data) {
85
85
  } else {
86
86
  name = item.product_name;
87
87
  }
88
+
89
+ // 如果处理完最后还没有 name,并且是 isEditMode,则 name 为 item.name
90
+ if (!name && item.isEditMode) {
91
+ name = item.name;
92
+ }
88
93
  return _objectSpread(_objectSpread({}, item), {}, {
89
94
  id: item.id,
90
95
  name: name,
@@ -103,7 +108,7 @@ export var formatDiscountWalletData = function formatDiscountWalletData(data) {
103
108
  code: item.code,
104
109
  disabled: item.isDisabled,
105
110
  showStatus: true,
106
- cardStatus: item.isDisabled ? 'conflict' : undefined,
111
+ cardStatus: item.isEditMode ? 'lastPayment' : item.isDisabled ? 'conflict' : undefined,
107
112
  cover: (_item$product2 = item.product) === null || _item$product2 === void 0 ? void 0 : _item$product2.cover,
108
113
  qrCode: item.code,
109
114
  validDate: voucherTime(item, 'expire_time'),
@@ -17,7 +17,7 @@ export declare const useWalletPass: (props: {
17
17
  cardData: any;
18
18
  handleSelectWallet: (value: number[]) => void;
19
19
  selectedWalletIds: any[];
20
- expiredWalletIds: any[];
20
+ expiredWalletIds: any;
21
21
  expiredWalletData: any;
22
22
  disabledWalletData: any[];
23
23
  clearAllSelectedWallet: () => void;
@@ -514,6 +514,7 @@ export var useWalletPass = function useWalletPass(props) {
514
514
  // 注册事件监听器
515
515
  core.effects.on('wallet:onWalletRecommendListUpdated', handleWalletRecommendListUpdated);
516
516
  core.effects.on('checkout:onPaymentStarted', handlePaymentStarted);
517
+ core.effects.on('checkout:onPaymentItemAdded', handlePaymentStarted);
517
518
  core.effects.on('wallet:onUserIdentificationCodesUpdated', handleUserIdentificationCodesUpdated);
518
519
  core.effects.on('wallet:onWalletCacheCleared', handleWalletCacheCleared);
519
520
  core.effects.on('wallet:onSearchIdentificationCodeCompleted', handleSearchIdentificationCodeCompleted);
@@ -526,6 +527,7 @@ export var useWalletPass = function useWalletPass(props) {
526
527
  return function () {
527
528
  core.effects.off('wallet:onWalletRecommendListUpdated', handleWalletRecommendListUpdated);
528
529
  core.effects.off('checkout:onPaymentStarted', handlePaymentStarted);
530
+ core.effects.off('checkout:onPaymentItemAdded', handlePaymentStarted);
529
531
  core.effects.off('wallet:onUserIdentificationCodesUpdated', handleUserIdentificationCodesUpdated);
530
532
  core.effects.off('wallet:onWalletCacheCleared', handleWalletCacheCleared);
531
533
  core.effects.off('wallet:onSearchIdentificationCodeCompleted', handleSearchIdentificationCodeCompleted);
@@ -69,7 +69,7 @@
69
69
  display: grid;
70
70
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); // 强制等宽分配
71
71
  grid-template-rows: auto auto;
72
- gap: 16px;
72
+ gap: 8px 16px;
73
73
  background-color: #f6f2ff;
74
74
  padding: 16px 16px 0 16px;
75
75
  border-radius: 0 0 12px 12px;