@pisell/private-materials 3.3.18 → 3.3.20

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 (221) 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/meta.js +1 -1
  5. package/build/lowcode/render/default/view.css +1 -1
  6. package/build/lowcode/render/default/view.js +3 -3
  7. package/build/lowcode/view.css +1 -1
  8. package/build/lowcode/view.js +3 -3
  9. package/es/businessModel/SalesModel/index.d.ts +0 -1
  10. package/es/components/Sales/Summary/utils.d.ts +1 -1
  11. package/es/components/appointmentBooking/components/Cart/index.d.ts +0 -1
  12. package/es/components/appointmentBooking/components/ConfirmInformation/index.js +3 -2
  13. package/es/components/appointmentBooking/components/Content/index.js +19 -22
  14. package/es/components/appointmentBooking/components/Date/index.js +66 -42
  15. package/es/components/appointmentBooking/components/Date/state.d.ts +1 -0
  16. package/es/components/appointmentBooking/components/Date/state.js +5 -0
  17. package/es/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
  18. package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  19. package/es/components/appointmentBooking/components/Form/index.js +12 -4
  20. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  21. package/es/components/appointmentBooking/components/Guest/index.js +4 -2
  22. package/es/components/appointmentBooking/components/Resource/index.js +7 -4
  23. package/es/components/appointmentBooking/components/Services/index.js +3 -2
  24. package/es/components/appointmentBooking/components/TimeSlicing/index.js +4 -2
  25. package/es/components/appointmentBooking/context.d.ts +3 -1
  26. package/es/components/appointmentBooking/context.js +63 -6
  27. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
  28. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +35 -11
  29. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.less +9 -0
  30. package/es/components/appointmentBooking/deposit/index.d.ts +0 -1
  31. package/es/components/appointmentBooking/hooks.d.ts +1 -0
  32. package/es/components/appointmentBooking/hooks.js +48 -8
  33. package/es/components/appointmentBooking/index.d.ts +0 -1
  34. package/es/components/appointmentBooking/locales.d.ts +6 -0
  35. package/es/components/appointmentBooking/locales.js +6 -0
  36. package/es/components/appointmentBooking/utils.d.ts +2 -2
  37. package/es/components/appointmentBooking/utils.js +10 -4
  38. package/es/components/booking/components/footer/index.d.ts +1 -0
  39. package/es/components/booking/components/voucher/index.d.ts +0 -1
  40. package/es/components/booking/deposit/index.d.ts +0 -1
  41. package/es/components/booking/deposit/index.js +1 -1
  42. package/es/components/booking/forms/footer.d.ts +0 -1
  43. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -2
  44. package/es/components/booking/forms/single/index.d.ts +1 -0
  45. package/es/components/booking/hooks/useClearCart.d.ts +0 -1
  46. package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
  47. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  48. package/es/components/booking/info/dateRange/index.d.ts +0 -1
  49. package/es/components/booking/info/service/Lists.d.ts +1 -0
  50. package/es/components/booking/info/service/addService/index.d.ts +0 -1
  51. package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  52. package/es/components/booking/info/service/serviceItem/index.d.ts +0 -1
  53. package/es/components/booking/info/service/serviceList/index.d.ts +0 -1
  54. package/es/components/booking/info/service2/utils.d.ts +1 -1
  55. package/es/components/booking/info2/service/serviceItem/index.d.ts +0 -1
  56. package/es/components/eftposPay/amount.d.ts +0 -1
  57. package/es/components/eftposPay/app.d.ts +0 -1
  58. package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -1
  59. package/es/components/eftposPay/component/fail/index.d.ts +0 -1
  60. package/es/components/eftposPay/device.d.ts +0 -1
  61. package/es/components/eftposPay/hooks.d.ts +1 -1
  62. package/es/components/eftposPay/index.d.ts +0 -1
  63. package/es/components/eftposPay/pay.d.ts +0 -1
  64. package/es/components/eftposPay/payo/config.d.ts +0 -1
  65. package/es/components/eftposPay/payo/config.js +14 -3
  66. package/es/components/eftposPay/payo/hooks.js +12 -1
  67. package/es/components/eftposPay/store/index.d.ts +3 -3
  68. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  69. package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +0 -1
  70. package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
  71. package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -1
  72. package/es/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
  73. package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
  74. package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
  75. package/es/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
  76. package/es/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
  77. package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
  78. package/es/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
  79. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  80. package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
  81. package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
  82. package/es/components/eventBooking/components/Provider/Resource/index.d.ts +0 -1
  83. package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
  84. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  85. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  86. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  87. package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -1
  88. package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
  89. package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
  90. package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
  91. package/es/components/eventBooking/index.d.ts +0 -1
  92. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  93. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  94. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  95. package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
  96. package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
  97. package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +0 -1
  98. package/es/components/pisellSelectCustomerModal/index.d.ts +0 -1
  99. package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
  100. package/es/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
  101. package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
  102. package/es/components/productExtension/index.d.ts +0 -1
  103. package/es/components/productSelect/components/TabProduct/index.d.ts +0 -1
  104. package/es/components/productSelect/components/productGroup/index.d.ts +0 -1
  105. package/es/components/ruleSetting/index.d.ts +0 -1
  106. package/es/components/shoppingCart/components/Cart/Product.d.ts +0 -1
  107. package/es/components/shoppingCart/components/Cart/index.d.ts +0 -1
  108. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
  109. package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -1
  110. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
  111. package/es/components/ticketBooking/components/timeBar/index.d.ts +0 -1
  112. package/es/components/wallet/hooks/useWalletCard.d.ts +0 -1
  113. package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
  114. package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
  115. package/lib/businessModel/SalesModel/index.d.ts +0 -1
  116. package/lib/components/Sales/Summary/utils.d.ts +1 -1
  117. package/lib/components/appointmentBooking/components/Cart/index.d.ts +0 -1
  118. package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +1 -0
  119. package/lib/components/appointmentBooking/components/Content/index.js +11 -11
  120. package/lib/components/appointmentBooking/components/Date/index.js +29 -12
  121. package/lib/components/appointmentBooking/components/Date/state.d.ts +1 -0
  122. package/lib/components/appointmentBooking/components/Date/state.js +7 -0
  123. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
  124. package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  125. package/lib/components/appointmentBooking/components/Form/index.js +6 -3
  126. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  127. package/lib/components/appointmentBooking/components/Guest/index.js +2 -1
  128. package/lib/components/appointmentBooking/components/Resource/index.js +6 -4
  129. package/lib/components/appointmentBooking/components/Services/index.js +2 -2
  130. package/lib/components/appointmentBooking/components/TimeSlicing/index.js +2 -1
  131. package/lib/components/appointmentBooking/context.d.ts +3 -1
  132. package/lib/components/appointmentBooking/context.js +28 -7
  133. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
  134. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +39 -4
  135. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.less +9 -0
  136. package/lib/components/appointmentBooking/deposit/index.d.ts +0 -1
  137. package/lib/components/appointmentBooking/hooks.d.ts +1 -0
  138. package/lib/components/appointmentBooking/hooks.js +29 -5
  139. package/lib/components/appointmentBooking/index.d.ts +0 -1
  140. package/lib/components/appointmentBooking/locales.d.ts +6 -0
  141. package/lib/components/appointmentBooking/locales.js +6 -0
  142. package/lib/components/appointmentBooking/utils.d.ts +2 -2
  143. package/lib/components/appointmentBooking/utils.js +8 -4
  144. package/lib/components/booking/components/footer/index.d.ts +1 -0
  145. package/lib/components/booking/components/voucher/index.d.ts +0 -1
  146. package/lib/components/booking/deposit/index.d.ts +0 -1
  147. package/lib/components/booking/deposit/index.js +1 -1
  148. package/lib/components/booking/forms/footer.d.ts +0 -1
  149. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -2
  150. package/lib/components/booking/forms/single/index.d.ts +1 -0
  151. package/lib/components/booking/hooks/useClearCart.d.ts +0 -1
  152. package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
  153. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  154. package/lib/components/booking/info/dateRange/index.d.ts +0 -1
  155. package/lib/components/booking/info/service/Lists.d.ts +1 -0
  156. package/lib/components/booking/info/service/addService/index.d.ts +0 -1
  157. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  158. package/lib/components/booking/info/service/serviceItem/index.d.ts +0 -1
  159. package/lib/components/booking/info/service/serviceList/index.d.ts +0 -1
  160. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  161. package/lib/components/booking/info2/service/serviceItem/index.d.ts +0 -1
  162. package/lib/components/eftposPay/amount.d.ts +0 -1
  163. package/lib/components/eftposPay/app.d.ts +0 -1
  164. package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -1
  165. package/lib/components/eftposPay/component/fail/index.d.ts +0 -1
  166. package/lib/components/eftposPay/device.d.ts +0 -1
  167. package/lib/components/eftposPay/hooks.d.ts +1 -1
  168. package/lib/components/eftposPay/index.d.ts +0 -1
  169. package/lib/components/eftposPay/pay.d.ts +0 -1
  170. package/lib/components/eftposPay/payo/config.d.ts +0 -1
  171. package/lib/components/eftposPay/payo/config.js +12 -1
  172. package/lib/components/eftposPay/payo/hooks.js +10 -0
  173. package/lib/components/eftposPay/store/index.d.ts +3 -3
  174. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  175. package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +0 -1
  176. package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
  177. package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -1
  178. package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
  179. package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
  180. package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
  181. package/lib/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
  182. package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
  183. package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
  184. package/lib/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
  185. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  186. package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
  187. package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
  188. package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +0 -1
  189. package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
  190. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  191. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  192. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  193. package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -1
  194. package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
  195. package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
  196. package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
  197. package/lib/components/eventBooking/index.d.ts +0 -1
  198. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  199. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  200. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  201. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
  202. package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
  203. package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +0 -1
  204. package/lib/components/pisellSelectCustomerModal/index.d.ts +0 -1
  205. package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
  206. package/lib/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
  207. package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
  208. package/lib/components/productExtension/index.d.ts +0 -1
  209. package/lib/components/productSelect/components/TabProduct/index.d.ts +0 -1
  210. package/lib/components/productSelect/components/productGroup/index.d.ts +0 -1
  211. package/lib/components/ruleSetting/index.d.ts +0 -1
  212. package/lib/components/shoppingCart/components/Cart/Product.d.ts +0 -1
  213. package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -1
  214. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
  215. package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -1
  216. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
  217. package/lib/components/ticketBooking/components/timeBar/index.d.ts +0 -1
  218. package/lib/components/wallet/hooks/useWalletCard.d.ts +0 -1
  219. package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
  220. package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
  221. package/package.json +3 -3
@@ -10,7 +10,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
10
10
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
11
  import React, { useState, useEffect } from 'react';
12
12
  import { Spin } from 'antd';
13
- import { PisellModal, PisellEmpty } from '@pisell/materials';
13
+ import { PisellModal, PisellEmpty, Button, Checkbox } from '@pisell/materials';
14
14
  import { locales, isMobile } from '@pisell/utils';
15
15
  import { useAppointmentBookingContext } from "../../../context";
16
16
  import "./index.less";
@@ -18,7 +18,10 @@ var DepositModal = function DepositModal(props) {
18
18
  var open = props.open,
19
19
  onCancel = props.onCancel,
20
20
  item = props.item,
21
- onChange = props.onChange;
21
+ onChange = props.onChange,
22
+ onConfirm = props.onConfirm,
23
+ _props$isHideCheckout = props.isHideCheckout,
24
+ isHideCheckout = _props$isHideCheckout === void 0 ? true : _props$isHideCheckout;
22
25
  var _useAppointmentBookin = useAppointmentBookingContext(),
23
26
  appointmentBooking = _useAppointmentBookin.appointmentBooking;
24
27
  var _useState = useState(null),
@@ -29,6 +32,13 @@ var DepositModal = function DepositModal(props) {
29
32
  _useState4 = _slicedToArray(_useState3, 2),
30
33
  loading = _useState4[0],
31
34
  setLoading = _useState4[1];
35
+ var _useState5 = useState(false),
36
+ _useState6 = _slicedToArray(_useState5, 2),
37
+ disabled = _useState6[0],
38
+ setDisabled = _useState6[1];
39
+ useEffect(function () {
40
+ setDisabled(!isHideCheckout);
41
+ }, [isHideCheckout]);
32
42
 
33
43
  /**
34
44
  * @title: 获取协议内容
@@ -52,23 +62,24 @@ var DepositModal = function DepositModal(props) {
52
62
  _yield$appointmentBoo = _context.sent;
53
63
  data = _yield$appointmentBoo.data;
54
64
  setPolicy(data);
55
- onChange(data);
56
- _context.next = 14;
65
+ onChange && onChange(data);
66
+ _context.next = 15;
57
67
  break;
58
68
  case 10:
59
69
  _context.prev = 10;
60
70
  _context.t0 = _context["catch"](1);
61
71
  console.log(_context.t0);
62
- onChange(_context.t0);
63
- case 14:
64
- _context.prev = 14;
72
+ onChange && onChange(_context.t0);
73
+ debugger;
74
+ case 15:
75
+ _context.prev = 15;
65
76
  setLoading(false);
66
- return _context.finish(14);
67
- case 17:
77
+ return _context.finish(15);
78
+ case 18:
68
79
  case "end":
69
80
  return _context.stop();
70
81
  }
71
- }, _callee, null, [[1, 10, 14, 17]]);
82
+ }, _callee, null, [[1, 10, 15, 18]]);
72
83
  }));
73
84
  return function getPolicy(_x) {
74
85
  return _ref.apply(this, arguments);
@@ -93,7 +104,20 @@ var DepositModal = function DepositModal(props) {
93
104
  className: 'policy-modal-wrap',
94
105
  cancelVisible: false,
95
106
  okText: locales.getText('pisell2.appointment.deposit.close'),
96
- onOk: onCancel
107
+ footer: [/*#__PURE__*/React.createElement("div", {
108
+ className: "policy-modal-footer"
109
+ }, !isHideCheckout ? /*#__PURE__*/React.createElement(Checkbox, {
110
+ className: "policy-modal-checkbox",
111
+ onChange: function onChange(e) {
112
+ var _e$target;
113
+ return setDisabled(!((_e$target = e.target) !== null && _e$target !== void 0 && _e$target.checked));
114
+ }
115
+ }, locales.getText('pisell2.appointment.policy')) : null, /*#__PURE__*/React.createElement(Button, {
116
+ type: "primary",
117
+ size: "large",
118
+ onClick: isHideCheckout ? onCancel : onConfirm,
119
+ disabled: disabled
120
+ }, locales.getText(isHideCheckout ? 'pisell2.appointment.deposit.close' : 'pisell2.appointment.policy.confirm')))]
97
121
  }, /*#__PURE__*/React.createElement(Spin, {
98
122
  style: {
99
123
  minHeight: '200px'
@@ -6,4 +6,13 @@
6
6
  .ant-empty-image {
7
7
  height: auto !important;
8
8
  }
9
+
10
+ .policy-modal-footer {
11
+ display: flex;
12
+ flex-direction: column;
13
+ flex: 1;
14
+ .policy-modal-checkbox {
15
+ margin-bottom: 20px;
16
+ }
17
+ }
9
18
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Deposit: (props: any) => JSX.Element;
4
3
  export default Deposit;
@@ -14,6 +14,7 @@ export declare const useAppointmentBookingStep: () => {
14
14
  removeStep: (key: string) => any;
15
15
  addStep: (props: any, stepKey?: string) => any;
16
16
  updateStep: (key: string, step: any) => void;
17
+ nextStep: () => void;
17
18
  };
18
19
  /**
19
20
  * @title: 获取商品数据
@@ -47,7 +47,9 @@ export var useAppointmentBookingStep = function useAppointmentBookingStep() {
47
47
  var pisellOS = usePisellOS();
48
48
  var _useAppointmentBookin = useAppointmentBookingContext(),
49
49
  appointmentBooking = _useAppointmentBookin.appointmentBooking,
50
- setCurrentStep = _useAppointmentBookin.setCurrentStep;
50
+ setCurrentStep = _useAppointmentBookin.setCurrentStep,
51
+ policyIdsRef = _useAppointmentBookin.policyIdsRef,
52
+ openPolicy = _useAppointmentBookin.openPolicy;
51
53
  var stepList = (appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$s = appointmentBooking.store) === null || _appointmentBooking$s === void 0 || (_appointmentBooking$s = _appointmentBooking$s.step) === null || _appointmentBooking$s === void 0 || (_appointmentBooking$s = _appointmentBooking$s.store) === null || _appointmentBooking$s === void 0 ? void 0 : _appointmentBooking$s.stepList) || [];
52
54
 
53
55
  // 判断是否是最后一步
@@ -117,12 +119,46 @@ export var useAppointmentBookingStep = function useAppointmentBookingStep() {
117
119
  isSkip: (step === null || step === void 0 ? void 0 : step.isSkip) || false
118
120
  });
119
121
  };
122
+
123
+ // 下一步
124
+ var nextStep = function nextStep() {
125
+ var _appointmentBooking$s2;
126
+ var currentStep = appointmentBooking === null || appointmentBooking === void 0 ? void 0 : appointmentBooking.getCurrentStep();
127
+ var stepList = (appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$s2 = appointmentBooking.store) === null || _appointmentBooking$s2 === void 0 || (_appointmentBooking$s2 = _appointmentBooking$s2.step) === null || _appointmentBooking$s2 === void 0 || (_appointmentBooking$s2 = _appointmentBooking$s2.store) === null || _appointmentBooking$s2 === void 0 ? void 0 : _appointmentBooking$s2.stepList) || [];
128
+
129
+ // 倒数第二步
130
+ if ((currentStep === null || currentStep === void 0 ? void 0 : currentStep.index) + 2 === (stepList === null || stepList === void 0 ? void 0 : stepList.length)) {
131
+ var _policyIdsRef$current;
132
+ // 如果没有同意资源上挂接的协议,则打开协议弹窗
133
+ if (policyIdsRef !== null && policyIdsRef !== void 0 && (_policyIdsRef$current = policyIdsRef.current) !== null && _policyIdsRef$current !== void 0 && _policyIdsRef$current.length) {
134
+ // 依次弹出所有协议
135
+ var idx = 0;
136
+ var showNextPolicy = function showNextPolicy() {
137
+ if (idx < policyIdsRef.current.length) {
138
+ openPolicy({
139
+ id: policyIdsRef.current[idx]
140
+ }, function () {
141
+ idx++;
142
+ showNextPolicy();
143
+ });
144
+ } else {
145
+ // 全部同意后,进入下一步
146
+ appointmentBooking.next();
147
+ }
148
+ };
149
+ showNextPolicy();
150
+ return;
151
+ }
152
+ }
153
+ appointmentBooking.next();
154
+ };
120
155
  return {
121
156
  getStepIndex: getStepIndex,
122
157
  stepList: stepList,
123
158
  removeStep: removeStep,
124
159
  addStep: addStep,
125
- updateStep: updateStep
160
+ updateStep: updateStep,
161
+ nextStep: nextStep
126
162
  };
127
163
  };
128
164
 
@@ -575,23 +611,26 @@ export var useAppointmentBookingResource = function useAppointmentBookingResourc
575
611
  * @Date: 2025-04-21 11:47
576
612
  */
577
613
  export var useIsSkipResourceStep = function useIsSkipResourceStep() {
578
- var _appointmentBooking$s2;
614
+ var _appointmentBooking$s3;
579
615
  var _useAppointmentBookin5 = useAppointmentBookingContext(),
580
616
  currentStep = _useAppointmentBookin5.currentStep,
581
- setCarts = _useAppointmentBookin5.setCarts;
617
+ setCarts = _useAppointmentBookin5.setCarts,
618
+ setPolicyIds = _useAppointmentBookin5.setPolicyIds;
582
619
  var _useAppointmentBookin6 = useAppointmentBookingResource(),
583
620
  getResourceList = _useAppointmentBookin6.getResourceList,
584
621
  autoSelectAllProductResources = _useAppointmentBookin6.autoSelectAllProductResources;
585
622
  var _useAppointmentBookin7 = useAppointmentBookingSetting(),
586
623
  isFormSubject = _useAppointmentBookin7.isFormSubject;
587
624
  var appointmentBooking = useAppointmentBooking();
588
- var stepList = (appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$s2 = appointmentBooking.store) === null || _appointmentBooking$s2 === void 0 || (_appointmentBooking$s2 = _appointmentBooking$s2.step) === null || _appointmentBooking$s2 === void 0 || (_appointmentBooking$s2 = _appointmentBooking$s2.store) === null || _appointmentBooking$s2 === void 0 ? void 0 : _appointmentBooking$s2.stepList) || [];
625
+ var stepList = (appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$s3 = appointmentBooking.store) === null || _appointmentBooking$s3 === void 0 || (_appointmentBooking$s3 = _appointmentBooking$s3.step) === null || _appointmentBooking$s3 === void 0 || (_appointmentBooking$s3 = _appointmentBooking$s3.store) === null || _appointmentBooking$s3 === void 0 ? void 0 : _appointmentBooking$s3.stepList) || [];
589
626
  var _useAppointmentBookin8 = useAppointmentBookingLogin(),
590
627
  isLogin = _useAppointmentBookin8.isLogin,
591
628
  openLoginModal = _useAppointmentBookin8.openLoginModal;
592
629
  var _useAppointmentBookin9 = useAppointmentBookingAccount(),
593
630
  getHolders = _useAppointmentBookin9.getHolders,
594
631
  checkAccount = _useAppointmentBookin9.checkAccount;
632
+ var _useAppointmentBookin10 = useAppointmentBookingStep(),
633
+ nextStep = _useAppointmentBookin10.nextStep;
595
634
  var utils = contextUtils();
596
635
  var checkSkipResourceStep = /*#__PURE__*/function () {
597
636
  var _ref20 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(isSkipUpdateFormStep) {
@@ -622,8 +661,9 @@ export var useIsSkipResourceStep = function useIsSkipResourceStep() {
622
661
  break;
623
662
  }
624
663
  if (!isSkipUpdateFormStep) {
625
- resultCarts = formatCartsResources(carts, resources); // 如果当前资源有表单,则添加表单步骤,否则删除表单步骤
664
+ resultCarts = formatCartsResources(carts, resources, setPolicyIds); // 如果当前资源有表单,则添加表单步骤,否则删除表单步骤
626
665
  checkHasFormStep({
666
+ nextStep: nextStep,
627
667
  isSkip: true,
628
668
  openLoginModal: openLoginModal,
629
669
  utils: utils,
@@ -683,8 +723,8 @@ export var useIsSkipResourceStep = function useIsSkipResourceStep() {
683
723
  export var useAppointmentBookingSetting = function useAppointmentBookingSetting() {
684
724
  var _appointmentBooking$o3;
685
725
  var utils = contextUtils();
686
- var _useAppointmentBookin10 = useAppointmentBookingContext(),
687
- appointmentBooking = _useAppointmentBookin10.appointmentBooking;
726
+ var _useAppointmentBookin11 = useAppointmentBookingContext(),
727
+ appointmentBooking = _useAppointmentBookin11.appointmentBooking;
688
728
  var _ref21 = (appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$o3 = appointmentBooking.otherParams) === null || _appointmentBooking$o3 === void 0 ? void 0 : _appointmentBooking$o3.productModuleParams) || {},
689
729
  bookingProcess = _ref21.bookingProcess,
690
730
  bookingSubject = _ref21.bookingSubject,
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const AppointmentBooking: () => JSX.Element;
4
3
  export default AppointmentBooking;
@@ -104,6 +104,8 @@ declare const _default: {
104
104
  'pisell2.appointment.unselect.date': string;
105
105
  'pisell2.appointment.unuse.date': string;
106
106
  'pisell2.appointment.add-guests': string;
107
+ 'pisell2.appointment.policy': string;
108
+ 'pisell2.appointment.policy.confirm': string;
107
109
  'pisell2.text.apply': string;
108
110
  'pisell2.text.goodpass': string;
109
111
  'pisell2.text.goodpass.product-vouchers': string;
@@ -219,6 +221,8 @@ declare const _default: {
219
221
  'pisell2.appointment.unselect.date': string;
220
222
  'pisell2.appointment.unuse.date': string;
221
223
  'pisell2.appointment.add-guests': string;
224
+ 'pisell2.appointment.policy': string;
225
+ 'pisell2.appointment.policy.confirm': string;
222
226
  'pisell2.text.apply': string;
223
227
  'pisell2.text.goodpass': string;
224
228
  'pisell2.text.goodpass.product-vouchers': string;
@@ -334,6 +338,8 @@ declare const _default: {
334
338
  'pisell2.appointment.unselect.date': string;
335
339
  'pisell2.appointment.unuse.date': string;
336
340
  'pisell2.appointment.add-guests': string;
341
+ 'pisell2.appointment.policy': string;
342
+ 'pisell2.appointment.policy.confirm': string;
337
343
  'pisell2.text.apply': string;
338
344
  'pisell2.text.goodpass': string;
339
345
  'pisell2.text.goodpass.product-vouchers': string;
@@ -120,6 +120,8 @@ export default {
120
120
  'pisell2.appointment.unselect.date': 'Please select date',
121
121
  'pisell2.appointment.unuse.date': 'This date is not available, please change the date.',
122
122
  'pisell2.appointment.add-guests': 'Add guests',
123
+ 'pisell2.appointment.policy': 'You have read and agreed to this policy',
124
+ 'pisell2.appointment.policy.confirm': 'Confirm',
123
125
  'pisell2.text.apply': 'Apply',
124
126
  'pisell2.text.goodpass': 'GoodPass',
125
127
  'pisell2.text.goodpass.product-vouchers': 'Product Vouchers',
@@ -251,6 +253,8 @@ export default {
251
253
  'pisell2.appointment.unselect.date': '请选择日期',
252
254
  'pisell2.appointment.unuse.date': '此日期不可用,请更换日期。',
253
255
  'pisell2.appointment.add-guests': '添加预约人',
256
+ 'pisell2.appointment.policy': '您已仔细阅读并同意此协议',
257
+ 'pisell2.appointment.policy.confirm': '确定',
254
258
  'pisell2.text.apply': '应用',
255
259
  'pisell2.text.goodpass': '商品券',
256
260
  'pisell2.text.goodpass.product-vouchers': '商品兑换券',
@@ -382,6 +386,8 @@ export default {
382
386
  'pisell2.appointment.unselect.date': '請選擇日期',
383
387
  'pisell2.appointment.unuse.date': '此日期不可用,請更換日期。',
384
388
  'pisell2.appointment.add-guests': '添加預約人',
389
+ 'pisell2.appointment.policy': '您已仔細閱讀並同意此協議',
390
+ 'pisell2.appointment.policy.confirm': '確定',
385
391
  'pisell2.text.apply': '應用',
386
392
  'pisell2.text.goodpass': '商品券',
387
393
  'pisell2.text.goodpass.product-vouchers': '商品兌換券',
@@ -17,7 +17,7 @@ export declare const formatGuest: (data: any[], products: any) => any[];
17
17
  * @Author: WangHan
18
18
  * @Date: 2025-05-06 22:22
19
19
  */
20
- export declare const formatCartsResources: (carts: any[], resources: any[]) => any[];
20
+ export declare const formatCartsResources: (carts: any[], resources: any[], setPolicyIds: any) => any[];
21
21
  /**
22
22
  * @title: 格式化购物车数据
23
23
  * @description:
@@ -111,4 +111,4 @@ export declare const Toast: (text: string) => void;
111
111
  * @Author: WangHan
112
112
  * @Date: 2025-05-06 21:51
113
113
  */
114
- export declare const checkHasFormStep: ({ isSkip, checkHolder, checkAccount, carts, setCarts, hasResourceFormId, currentStep, stepList, appointmentBooking, locales, isLogin, openLoginModal, isFormSubject, utils, accountLists, getHolders }: any) => true | undefined;
114
+ export declare const checkHasFormStep: ({ nextStep, isSkip, checkHolder, checkAccount, carts, setCarts, hasResourceFormId, currentStep, stepList, appointmentBooking, locales, isLogin, openLoginModal, isFormSubject, utils, accountLists, getHolders }: any) => true | undefined;
@@ -57,8 +57,9 @@ export var formatGuest = function formatGuest(data, products) {
57
57
  * @Author: WangHan
58
58
  * @Date: 2025-05-06 22:22
59
59
  */
60
- export var formatCartsResources = function formatCartsResources(carts, resources) {
60
+ export var formatCartsResources = function formatCartsResources(carts, resources, setPolicyIds) {
61
61
  try {
62
+ var policyIds = [];
62
63
  var newCarts = carts === null || carts === void 0 ? void 0 : carts.map(function (d) {
63
64
  var _currentResource$reso;
64
65
  var currentResource = resources === null || resources === void 0 ? void 0 : resources.find(function (r) {
@@ -77,9 +78,13 @@ export var formatCartsResources = function formatCartsResources(carts, resources
77
78
  return _objectSpread(_objectSpread({}, d), {}, {
78
79
  resource_form_id: foundResource === null || foundResource === void 0 ? void 0 : foundResource.resource_form_id
79
80
  });
81
+ } else if (foundResource !== null && foundResource !== void 0 && foundResource.policy_id && !policyIds.includes(foundResource === null || foundResource === void 0 ? void 0 : foundResource.policy_id)) {
82
+ // 资源上没有挂接表单,但是有协议,则在触发按钮的时候需要同意协议才能继续
83
+ policyIds.push(foundResource === null || foundResource === void 0 ? void 0 : foundResource.policy_id);
80
84
  }
81
85
  return false;
82
86
  }).filter(Boolean);
87
+ setPolicyIds(policyIds);
83
88
  return newCarts || [];
84
89
  } catch (error) {
85
90
  console.log(error, 'formatCarts');
@@ -371,7 +376,8 @@ export var Toast = function Toast(text) {
371
376
  */
372
377
  export var checkHasFormStep = function checkHasFormStep(_ref2) {
373
378
  var _appointmentBooking$s;
374
- var isSkip = _ref2.isSkip,
379
+ var nextStep = _ref2.nextStep,
380
+ isSkip = _ref2.isSkip,
375
381
  checkHolder = _ref2.checkHolder,
376
382
  checkAccount = _ref2.checkAccount,
377
383
  carts = _ref2.carts,
@@ -453,14 +459,14 @@ export var checkHasFormStep = function checkHasFormStep(_ref2) {
453
459
  isNext = true;
454
460
  }
455
461
  if (isNext && !_checkHolder()) {
456
- appointmentBooking.next();
462
+ nextStep();
457
463
  } else {
458
464
  return true;
459
465
  }
460
466
  } else {
461
467
  // 如果只有一个资源执行跳过
462
468
  if (isSkip) {
463
- appointmentBooking.next();
469
+ nextStep();
464
470
  }
465
471
  }
466
472
  };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  /**
3
4
  * @title: 底部
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const VoucherCard: (props: any) => JSX.Element | null;
4
3
  export default VoucherCard;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Deposit: (props: any) => JSX.Element;
3
2
  export default Deposit;
@@ -97,7 +97,7 @@ var Deposit = function Deposit(props) {
97
97
  }, [globalState]);
98
98
  var depositList = useMemo(function () {
99
99
  if (!bookingId) return [];
100
- if (Number(bookingDetail === null || bookingDetail === void 0 ? void 0 : bookingDetail.deposit_amount) === 0) return [];
100
+ if ((bookingDetail === null || bookingDetail === void 0 ? void 0 : bookingDetail.is_deposit) === 0) return [];
101
101
  return [{
102
102
  customer: bookingDetail === null || bookingDetail === void 0 ? void 0 : bookingDetail.customer,
103
103
  status: bookingDetail === null || bookingDetail === void 0 ? void 0 : bookingDetail.deposit_payment_status,
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface FooterProps {
3
2
  state: any;
4
3
  reload: () => void;
@@ -1,10 +1,9 @@
1
- /// <reference types="react" />
2
1
  import { SendModalValues } from './index';
3
2
  declare const useSendModal: (bookingId?: number) => {
4
3
  open: boolean;
5
4
  setOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
6
5
  handleOpen: () => void;
7
6
  handleValuesChange: (val: any) => void;
8
- handleOk: (values: SendModalValues) => Promise<boolean | undefined>;
7
+ handleOk: (values: SendModalValues) => Promise<any>;
9
8
  };
10
9
  export default useSendModal;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  /**
3
4
  * @title: 表单选择器
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const useClearCart: (state: any, dispatch: any) => false | JSX.Element;
3
2
  export default useClearCart;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface AddServiceVariantProps {
3
2
  globalState: any;
4
3
  setGlobalState: any;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { FormState } from '../../../model';
2
3
  interface useClientFnParams {
3
4
  state: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  export declare const disabledDate: (current: any, position: any, currentDate: any) => any;
4
3
  declare const DateRange: ({ state, dispatch, key }: any) => JSX.Element;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Lists: ({ onEdit, onChange, onAction, isParallelResource }: any) => JSX.Element;
2
3
  export default Lists;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PisellDrawerProps } from '../../../components/drawer';
3
2
  import './index.less';
4
3
  interface AddServiceProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const BookingList: ({ items }: {
3
2
  items: any[];
4
3
  }) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ServiceItem: ({ d, handleEditService, state, handleLike, resourceItem, errorMessage, handleDeleteService, }: any) => JSX.Element;
4
3
  export default ServiceItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ServiceList: ({ onEdit }: {
4
3
  onEdit: any;
@@ -240,4 +240,4 @@ export declare const updateAppointmentServicePrice: (state: any, { start_date, e
240
240
  * @Author: WangHan
241
241
  * @Date: 2024-12-24 11:32
242
242
  */
243
- export declare const updateServicePrice: (state: any) => never[] | Promise<any>;
243
+ export declare const updateServicePrice: (state: any) => Promise<any> | never[];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ServiceItem: ({ d, handleEditService, state, handleLike, errorMessage, handleDeleteService, }: any) => JSX.Element;
4
3
  export default ServiceItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PosProps } from './const';
3
2
  /**
4
3
  * @title: 支付金额信息配置页
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PosProps, RouteType } from './const';
3
2
  declare const App: ({ action, api, device_number, terminal, tyroUrl, tyroVersion, onChangeParams, isMobile, channel, formatAmount, ...props }: Omit<PosProps, "type" | "mode" | "getApi"> & {
4
3
  action: RouteType;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ActionProps } from '../../const';
3
2
  declare const _default: ({ className, isMobile, onChange }: ActionProps) => JSX.Element;
4
3
  export default _default;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ActionProps } from '../../const';
3
2
  declare const _default: ({ onChange, className, isMobile }: ActionProps) => JSX.Element;
4
3
  export default _default;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PayProps, PosProps } from './const';
3
2
  import './device.less';
4
3
  /**
@@ -15,7 +15,7 @@ export declare const useStoreRef: <T extends {
15
15
  readonly numRef: React.MutableRefObject<string | number | undefined>;
16
16
  readonly orderIdRef: React.MutableRefObject<string | number>;
17
17
  readonly modeRef: React.MutableRefObject<ModeEnum>;
18
- readonly statusRef: React.MutableRefObject<"success" | "loading" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question">;
18
+ readonly statusRef: React.MutableRefObject<"success" | "warn" | "loading" | "fail" | "pedding" | "resove" | "reject" | "question">;
19
19
  readonly netRef: React.MutableRefObject<boolean | undefined>;
20
20
  readonly symbolRef: React.MutableRefObject<string>;
21
21
  readonly amountRef: React.MutableRefObject<string | number>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PosProps } from './const';
3
2
  import './index.less';
4
3
  declare const _default: (props: PosProps) => JSX.Element | null;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PayProps } from './const';
3
2
  import './index.less';
4
3
  /**
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { StatusEnum } from '../const';
3
2
  export declare const POS: ({ api, onChange, }: {
4
3
  api: {
@@ -33,7 +33,8 @@ export var POS = function POS(_ref) {
33
33
  var api = _ref.api,
34
34
  onChange = _ref.onChange;
35
35
  var _useContextData = useContextData(),
36
- steps = _useContextData.steps;
36
+ steps = _useContextData.steps,
37
+ custom = _useContextData.custom;
37
38
  var _useStoreRef = useStoreRef(),
38
39
  deviceRef = _useStoreRef.deviceRef,
39
40
  payRef = _useStoreRef.payRef,
@@ -150,7 +151,17 @@ export var POS = function POS(_ref) {
150
151
  }));
151
152
  controllerRef.current = new AbortController();
152
153
  // 支付 or 退款
153
- var resultPromise = modeRef.current === ModeEnum.Pay || modeRef.current === ModeEnum.FullPay ? api.pay({
154
+ var resultPromise = modeRef.current === ModeEnum.Pay || modeRef.current === ModeEnum.FullPay ? api.pay(_objectSpread(_objectSpread({}, custom !== null && custom !== void 0 && custom.platform ? {
155
+ "operator_id": custom.operator_id,
156
+ "operator_type": custom.operator_type,
157
+ "platform": custom.platform,
158
+ "custom_payment_id": custom.custom_payment_id,
159
+ "service_charge": {
160
+ "amount": payRef.current.surMoney,
161
+ "percentage": payRef.current.surPercentRate
162
+ },
163
+ "original_amount": payRef.current.amount
164
+ } : {}), {}, {
154
165
  order_id: orderIdRef.current,
155
166
  amount: payRef.current.total,
156
167
  card_reader_type: eftposRef.current,
@@ -159,7 +170,7 @@ export var POS = function POS(_ref) {
159
170
  pay_param_base64: encodeURIComponent(btoa(encodeURIComponent(JSON.stringify(_objectSpread(_objectSpread({}, dataRef.current), {}, {
160
171
  number: numRef.current
161
172
  })))))
162
- }, {
173
+ }), {
163
174
  signal: controllerRef.current.signal
164
175
  }) : api.refund({
165
176
  order_id: orderIdRef.current,
@@ -12,6 +12,7 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
12
12
  import { useCallback, useEffect, useRef } from 'react';
13
13
  import { PayStatus } from "../const";
14
14
  import { sleep } from "../helper";
15
+ import { sendWarningLog } from '@pisell/utils';
15
16
 
16
17
  /**
17
18
  * @title: 循环查询 接口状态
@@ -111,14 +112,24 @@ export var useValidate = function useValidate(timeout) {
111
112
  (_controllerRef$curren = controllerRef.current) === null || _controllerRef$curren === void 0 || _controllerRef$curren.abort();
112
113
  }, []);
113
114
  var run = function run() {
115
+ for (var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++) {
116
+ params[_key] = arguments[_key];
117
+ }
114
118
  isTimeoutCloseRef.current = false;
115
119
  TimeoutRef.current && clearTimeout(TimeoutRef.current);
116
120
  // 开启计时
117
121
  TimeoutRef.current = setTimeout(function () {
118
122
  isTimeoutCloseRef.current = true;
123
+ sendWarningLog({
124
+ title: '支付状态查询超时',
125
+ content: [{
126
+ key: 'params',
127
+ value: JSON.stringify(params)
128
+ }]
129
+ });
119
130
  close();
120
131
  }, timeout);
121
- return checkApi.apply(void 0, arguments);
132
+ return checkApi.apply(void 0, params);
122
133
  };
123
134
  useEffect(function () {
124
135
  return function () {