@pisell/private-materials 6.2.2 → 6.2.4

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 (77) 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.js +1 -1
  6. package/build/lowcode/view.js +1 -1
  7. package/es/components/Sales/Summary/utils.d.ts +1 -1
  8. package/es/components/booking/addons/model.d.ts +1 -10
  9. package/es/components/booking/forms/model.d.ts +1 -10
  10. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  11. package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
  12. package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  13. package/es/components/booking/info/index.d.ts +0 -1
  14. package/es/components/booking/info/model.d.ts +1 -10
  15. package/es/components/booking/info/service/Lists.d.ts +0 -1
  16. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  17. package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  18. package/es/components/booking/info/service2/Lists.d.ts +0 -1
  19. package/es/components/booking/info2/index.js +27 -9
  20. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  21. package/es/components/booking/materiels/holder/index.d.ts +0 -1
  22. package/es/components/booking/model.d.ts +1 -9
  23. package/es/components/booking/notes/model.d.ts +1 -10
  24. package/es/components/booking/payments/model.d.ts +1 -10
  25. package/es/components/booking/utils.d.ts +2 -2
  26. package/es/components/eftposPay/amount.d.ts +1 -1
  27. package/es/components/eftposPay/device.d.ts +1 -1
  28. package/es/components/eftposPay/hooks.d.ts +2 -2
  29. package/es/components/eftposPay/store/index.d.ts +4 -4
  30. package/es/components/pay/toC/PaymentMethods/index.js +70 -21
  31. package/es/components/pay/toC/index.js +46 -14
  32. package/es/components/pay/toC/model.d.ts +1 -9
  33. package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
  34. package/es/components/schedules/model.d.ts +1 -9
  35. package/es/components/ticketBooking/components/ticketBooking/index.js +2 -2
  36. package/es/components/wallet/Detail/model.d.ts +1 -13
  37. package/es/components/wallet/DiscountCard/model.d.ts +1 -14
  38. package/es/components/wallet/PointCard/model.d.ts +1 -13
  39. package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
  40. package/es/components/wallet/Voucher/model.d.ts +1 -13
  41. package/es/components/wallet/model.d.ts +1 -9
  42. package/lib/components/Sales/Summary/utils.d.ts +1 -1
  43. package/lib/components/booking/addons/model.d.ts +1 -10
  44. package/lib/components/booking/forms/model.d.ts +1 -10
  45. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  46. package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
  47. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  48. package/lib/components/booking/info/index.d.ts +0 -1
  49. package/lib/components/booking/info/model.d.ts +1 -10
  50. package/lib/components/booking/info/service/Lists.d.ts +0 -1
  51. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  52. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  53. package/lib/components/booking/info/service2/Lists.d.ts +0 -1
  54. package/lib/components/booking/info2/index.js +29 -4
  55. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  56. package/lib/components/booking/materiels/holder/index.d.ts +0 -1
  57. package/lib/components/booking/model.d.ts +1 -9
  58. package/lib/components/booking/notes/model.d.ts +1 -10
  59. package/lib/components/booking/payments/model.d.ts +1 -10
  60. package/lib/components/booking/utils.d.ts +2 -2
  61. package/lib/components/eftposPay/amount.d.ts +1 -1
  62. package/lib/components/eftposPay/device.d.ts +1 -1
  63. package/lib/components/eftposPay/hooks.d.ts +2 -2
  64. package/lib/components/eftposPay/store/index.d.ts +4 -4
  65. package/lib/components/pay/toC/PaymentMethods/index.js +30 -2
  66. package/lib/components/pay/toC/index.js +29 -9
  67. package/lib/components/pay/toC/model.d.ts +1 -9
  68. package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
  69. package/lib/components/schedules/model.d.ts +1 -9
  70. package/lib/components/ticketBooking/components/ticketBooking/index.js +25 -25
  71. package/lib/components/wallet/Detail/model.d.ts +1 -13
  72. package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
  73. package/lib/components/wallet/PointCard/model.d.ts +1 -13
  74. package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
  75. package/lib/components/wallet/Voucher/model.d.ts +1 -13
  76. package/lib/components/wallet/model.d.ts +1 -9
  77. package/package.json +3 -3
@@ -30,7 +30,7 @@ export declare const calculateSubtotal: (items: CartItem[]) => string;
30
30
  * @return {*}
31
31
  * @Author: xiangfeng.xue
32
32
  */
33
- export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => "0.00" | Decimal;
33
+ export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => Decimal | "0.00";
34
34
  /**
35
35
  * 计算所有价格明细
36
36
  * @param items - 购物车商品数组
@@ -1,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -1,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -4,6 +4,6 @@ declare const useSendModal: (bookingId?: number) => {
4
4
  setOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
5
5
  handleOpen: () => void;
6
6
  handleValuesChange: (val: any) => void;
7
- handleOk: (values: SendModalValues) => Promise<boolean | undefined>;
7
+ handleOk: (values: SendModalValues) => Promise<any>;
8
8
  };
9
9
  export default useSendModal;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface AddServiceVariantProps {
3
2
  globalState: any;
4
3
  setGlobalState: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { EditServiceRef } from "../service/editService";
3
2
  declare const useInfoHolder: (state: any, dispatch: any) => {
4
3
  detailRef: import("react").MutableRefObject<EditServiceRef | undefined>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { InfoProps } from './main';
3
2
  declare const APP: (props: InfoProps) => JSX.Element;
4
3
  export default APP;
@@ -1,14 +1,5 @@
1
- /// <reference types="react" />
2
- import { FormState } from '../model';
3
1
  export declare const walkInData: {
4
2
  id: number;
5
3
  nickname: string;
6
4
  };
7
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
8
- state: FormState;
9
- } & {
10
- dispatch: (params: {
11
- type: string;
12
- payload: any;
13
- }) => void;
14
- }>;
5
+ export declare const Provider: any, Context: any;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Lists: ({ onEdit, onChange, onAction, isParallelResource }: any) => JSX.Element;
3
2
  export default Lists;
@@ -6,7 +6,7 @@ export declare const getDurationProps: ({ cacheItem, useStartTime, currentResour
6
6
  type: string;
7
7
  value: number;
8
8
  };
9
- locale: string;
9
+ locale: any;
10
10
  slice: any;
11
11
  selectProps: {
12
12
  size: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const BookingList: ({ items }: {
3
2
  items: any[];
4
3
  }) => JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Lists: ({ onEdit, onChange }: any) => JSX.Element;
3
2
  export default Lists;
@@ -180,8 +180,22 @@ var Info = Provider(function (props) {
180
180
  }));
181
181
  case 3:
182
182
  data = _context.sent;
183
- data.date = currentDate;
184
- localStorage.setItem('bookingResourceList', JSON.stringify(data));
183
+ try {
184
+ data.date = currentDate;
185
+ localStorage.setItem('bookingResourceList', JSON.stringify(data));
186
+ } catch (error) {
187
+ sendWarningLog({
188
+ title: "\u8BBE\u7F6E\u8D44\u6E90\u5931\u8D25",
189
+ content: [{
190
+ key: 'error',
191
+ value: JSON.stringify({
192
+ message: error === null || error === void 0 ? void 0 : error.message,
193
+ stack: error === null || error === void 0 ? void 0 : error.stack,
194
+ name: error === null || error === void 0 ? void 0 : error.name
195
+ })
196
+ }]
197
+ });
198
+ }
185
199
  modal.dispatch({
186
200
  type: 'setService',
187
201
  payload: _objectSpread(_objectSpread({}, stateRef.current.service), {}, {
@@ -191,16 +205,20 @@ var Info = Provider(function (props) {
191
205
  })
192
206
  });
193
207
  resolve(data);
194
- _context.next = 15;
208
+ _context.next = 14;
195
209
  break;
196
- case 10:
197
- _context.prev = 10;
210
+ case 9:
211
+ _context.prev = 9;
198
212
  _context.t0 = _context["catch"](0);
199
213
  sendWarningLog({
200
- title: "\u83B7\u53D6\u8D44\u6E90\u6570\u636E\u5931\u8D25",
214
+ title: "\u83B7\u53D6\u8D44\u6E90\u5931\u8D25",
201
215
  content: [{
202
216
  key: 'error',
203
- value: JSON.stringify(_context.t0)
217
+ value: JSON.stringify({
218
+ message: _context.t0 === null || _context.t0 === void 0 ? void 0 : _context.t0.message,
219
+ stack: _context.t0 === null || _context.t0 === void 0 ? void 0 : _context.t0.stack,
220
+ name: _context.t0 === null || _context.t0 === void 0 ? void 0 : _context.t0.name
221
+ })
204
222
  }]
205
223
  });
206
224
  modal.dispatch({
@@ -210,11 +228,11 @@ var Info = Provider(function (props) {
210
228
  })
211
229
  });
212
230
  reject(_context.t0);
213
- case 15:
231
+ case 14:
214
232
  case "end":
215
233
  return _context.stop();
216
234
  }
217
- }, _callee, null, [[0, 10]]);
235
+ }, _callee, null, [[0, 9]]);
218
236
  })), timeoutNumber);
219
237
  }));
220
238
  case 4:
@@ -7,7 +7,7 @@ export declare const getDurationProps: ({ cacheItem, useStartTime, currentResour
7
7
  type: string;
8
8
  value: number;
9
9
  };
10
- locale: string;
10
+ locale: any;
11
11
  slice: any;
12
12
  selectProps: {
13
13
  size: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SelectProps } from 'antd';
3
2
  interface HolderProps extends SelectProps {
4
3
  selectProps?: SelectProps;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface FormState {
3
2
  amountSymbol: string;
4
3
  apis: {
@@ -106,11 +105,4 @@ export declare const walkInData: {
106
105
  id: number;
107
106
  nickname: string;
108
107
  };
109
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
110
- state: FormState;
111
- } & {
112
- dispatch: (params: {
113
- type: string;
114
- payload: any;
115
- }) => void;
116
- }>;
108
+ export declare const Provider: any, Context: any;
@@ -1,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -1,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -165,10 +165,10 @@ export declare const getProductTotalPrice: (item: any) => number;
165
165
  export declare const getDuration: (duration: number | {
166
166
  type: string;
167
167
  value: number;
168
- }) => number | "flexible" | {
168
+ }) => number | {
169
169
  type: string;
170
170
  value: number;
171
- };
171
+ } | "flexible";
172
172
  export declare const isWalkIn: (customer_id?: number | string) => boolean;
173
173
  export declare const getIsEdit: (state: any) => boolean;
174
174
  export {};
@@ -8,7 +8,7 @@ import { PosProps } from './const';
8
8
  */
9
9
  declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
10
10
  className?: string | undefined;
11
- onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
11
+ onChange?: ((status: "success" | "page" | "fail" | "print" | "mark_tx_processed", params?: string | {
12
12
  [keys: string]: unknown;
13
13
  } | undefined, other?: any) => void) | undefined;
14
14
  onClose: () => void;
@@ -10,7 +10,7 @@ import './device.less';
10
10
  declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
11
11
  api: PayProps['api'];
12
12
  className?: string | undefined;
13
- onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
13
+ onChange?: ((status: "success" | "page" | "fail" | "print" | "mark_tx_processed", params?: string | {
14
14
  [keys: string]: unknown;
15
15
  } | undefined, other?: any) => void) | undefined;
16
16
  onClose: () => void;
@@ -15,11 +15,11 @@ 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>;
22
- readonly eftposRef: React.MutableRefObject<"tyro" | "windcave" | "stripe" | "payo" | "linkly">;
22
+ readonly eftposRef: React.MutableRefObject<"payo" | "tyro" | "windcave" | "stripe" | "linkly">;
23
23
  readonly clientRef: React.MutableRefObject<ClientEnum>;
24
24
  readonly dataRef: React.MutableRefObject<import("./store").State>;
25
25
  };
@@ -174,7 +174,7 @@ export declare const updateCustom: (payload: {
174
174
  export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
175
175
  type: EActionTypes;
176
176
  payload: {
177
- status: "success" | "loading" | "warn" | "fail" | "question";
177
+ status: "success" | "warn" | "loading" | "fail" | "question";
178
178
  };
179
179
  };
180
180
  /**
@@ -295,9 +295,9 @@ export declare const backUpFree: (payload: Partial<State>) => {
295
295
  name?: string | undefined;
296
296
  symbol?: string | undefined;
297
297
  amount?: string | number | undefined;
298
- mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
298
+ mode?: "pay" | "fullPay" | "refund" | "query" | undefined;
299
299
  order_id?: string | number | undefined;
300
- eftpos?: "tyro" | "windcave" | "stripe" | "payo" | "linkly" | undefined;
300
+ eftpos?: "payo" | "tyro" | "windcave" | "stripe" | "linkly" | undefined;
301
301
  action?: "amount" | "pay" | "deviceList" | undefined;
302
302
  key?: number | undefined;
303
303
  step?: number | undefined;
@@ -308,7 +308,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
308
308
  net?: boolean | undefined;
309
309
  component?: string | undefined;
310
310
  form?: string | undefined;
311
- status?: "success" | "loading" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
311
+ status?: "success" | "warn" | "loading" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
312
312
  warn?: string | undefined;
313
313
  steps?: {
314
314
  /** 用于重置当前步骤 */
@@ -27,7 +27,7 @@ import GlobePayQrcode from "./GlobePayQrcode";
27
27
  import { walletPassPay } from "./WalletPass/serve";
28
28
  import { formatWalletPassParams } from "../utils";
29
29
  import useEngineContext from "../../../../hooks/useEngineContext";
30
- import { isJson } from "@pisell/utils";
30
+ import { isJson, sendWarningLog } from "@pisell/utils";
31
31
  var isOfflinePayment = function isOfflinePayment(type) {
32
32
  if (isCustomPayment(type)) {
33
33
  return true;
@@ -62,15 +62,33 @@ var PaymentMethods = function PaymentMethods(props, ref) {
62
62
  case 0:
63
63
  type = _ref.type, payGroup = _ref.payGroup;
64
64
  waitAmount = (payGroup === null || payGroup === void 0 ? void 0 : payGroup.wait_amount) || 0;
65
- cards = payGroup === null || payGroup === void 0 || (_payGroup$walletPass = payGroup.walletPass) === null || _payGroup$walletPass === void 0 || (_payGroup$walletPass = _payGroup$walletPass.cards) === null || _payGroup$walletPass === void 0 ? void 0 : _payGroup$walletPass.length; // 仅选择钱包 并且当前选择的支付方式是 线下支付|自定义支付|银行转账, 前置支付钱包
65
+ cards = payGroup === null || payGroup === void 0 || (_payGroup$walletPass = payGroup.walletPass) === null || _payGroup$walletPass === void 0 || (_payGroup$walletPass = _payGroup$walletPass.cards) === null || _payGroup$walletPass === void 0 ? void 0 : _payGroup$walletPass.length;
66
+ sendWarningLog({
67
+ title: '支付初始化',
68
+ content: [{
69
+ key: 'type',
70
+ value: type
71
+ }, {
72
+ key: 'payGroup',
73
+ value: JSON.stringify(payGroup)
74
+ }, {
75
+ key: 'waitAmount',
76
+ value: waitAmount
77
+ }, {
78
+ key: 'cards',
79
+ value: cards
80
+ }]
81
+ });
82
+
83
+ // 仅选择钱包 并且当前选择的支付方式是 线下支付|自定义支付|银行转账, 前置支付钱包
66
84
  if (!(cards && (waitAmount <= 0 || isOfflinePayment(type)))) {
67
- _context.next = 13;
85
+ _context.next = 15;
68
86
  break;
69
87
  }
70
- _context.prev = 4;
71
- _context.next = 7;
88
+ _context.prev = 5;
89
+ _context.next = 8;
72
90
  return walletPassPay(formatWalletPassParams(payGroup));
73
- case 7:
91
+ case 8:
74
92
  // 支付成功后 清空卡片
75
93
  syncPayGroupToStorage(_objectSpread(_objectSpread({}, payGroup), {}, {
76
94
  walletPass: _objectSpread(_objectSpread({}, payGroup.walletPass), {}, {
@@ -78,11 +96,26 @@ var PaymentMethods = function PaymentMethods(props, ref) {
78
96
  paid: true
79
97
  })
80
98
  }));
81
- _context.next = 13;
99
+ _context.next = 15;
82
100
  break;
83
- case 10:
84
- _context.prev = 10;
85
- _context.t0 = _context["catch"](4);
101
+ case 11:
102
+ _context.prev = 11;
103
+ _context.t0 = _context["catch"](5);
104
+ sendWarningLog({
105
+ title: '钱包支付失败 catch',
106
+ content: [{
107
+ key: '错误信息',
108
+ value: (_context.t0 === null || _context.t0 === void 0 ? void 0 : _context.t0.message) || '未知错误'
109
+ }, {
110
+ key: '错误堆栈',
111
+ value: (_context.t0 === null || _context.t0 === void 0 ? void 0 : _context.t0.stack) || '无堆栈信息'
112
+ }, {
113
+ key: '错误类型',
114
+ value: (_context.t0 === null || _context.t0 === void 0 ? void 0 : _context.t0.name) || '未知错误类型'
115
+ }]
116
+ });
117
+
118
+ // 钱包支付失败时 跳转失败页面 不继续后续流程
86
119
  return _context.abrupt("return", props.payCallback({
87
120
  key: 'fail',
88
121
  data: {
@@ -91,28 +124,44 @@ var PaymentMethods = function PaymentMethods(props, ref) {
91
124
  fn: 'init'
92
125
  }
93
126
  }));
94
- case 13:
127
+ case 15:
95
128
  if (!(waitAmount <= 0)) {
96
- _context.next = 17;
129
+ _context.next = 18;
97
130
  break;
98
131
  }
99
- // 清空交易组
100
- removePayGroupFromStorage(payGroup.order_id);
101
- props.payCallback({
102
- key: 'success'
103
- });
132
+ try {
133
+ // 清空交易组
134
+ removePayGroupFromStorage(payGroup.order_id);
135
+ props.payCallback({
136
+ key: 'success'
137
+ });
138
+ } catch (err) {
139
+ sendWarningLog({
140
+ title: '跳转成功页面 catch',
141
+ content: [{
142
+ key: '错误信息',
143
+ value: (err === null || err === void 0 ? void 0 : err.message) || '未知错误'
144
+ }, {
145
+ key: '错误堆栈',
146
+ value: (err === null || err === void 0 ? void 0 : err.stack) || '无堆栈信息'
147
+ }, {
148
+ key: '错误类型',
149
+ value: (err === null || err === void 0 ? void 0 : err.name) || '未知错误类型'
150
+ }]
151
+ });
152
+ }
104
153
  return _context.abrupt("return");
105
- case 17:
106
- _context.next = 19;
154
+ case 18:
155
+ _context.next = 20;
107
156
  return onPayByType({
108
157
  type: type,
109
158
  payGroup: payGroup
110
159
  });
111
- case 19:
160
+ case 20:
112
161
  case "end":
113
162
  return _context.stop();
114
163
  }
115
- }, _callee, null, [[4, 10]]);
164
+ }, _callee, null, [[5, 11]]);
116
165
  }));
117
166
  return function init(_x) {
118
167
  return _ref2.apply(this, arguments);
@@ -17,7 +17,7 @@ import React, { useState, useMemo, useContext, useRef, useImperativeHandle, forw
17
17
  import { Decimal } from 'decimal.js';
18
18
  import { useMemoizedFn, useUpdateEffect } from 'ahooks';
19
19
  import { PisellModal, PisellText, PisellContainer, PisellLoading, PisellToast } from '@pisell/materials';
20
- import { detectIncognito, locales, copyToClipboard } from '@pisell/utils';
20
+ import { detectIncognito, locales, copyToClipboard, sendWarningLog } from '@pisell/utils';
21
21
  import PayCountdown from "./PayCountdown";
22
22
  import PayAmount from "./PayAmount";
23
23
  import WalletPassBlock from "./WalletPassBlock";
@@ -373,6 +373,19 @@ var ToCPay = function ToCPay(props, ref) {
373
373
  case 10:
374
374
  _context5.prev = 10;
375
375
  _context5.t0 = _context5["catch"](2);
376
+ sendWarningLog({
377
+ title: '创建交易组失败 paymentInit catch',
378
+ content: [{
379
+ key: '错误信息',
380
+ value: (_context5.t0 === null || _context5.t0 === void 0 ? void 0 : _context5.t0.message) || '未知错误'
381
+ }, {
382
+ key: '错误堆栈',
383
+ value: (_context5.t0 === null || _context5.t0 === void 0 ? void 0 : _context5.t0.stack) || '无堆栈信息'
384
+ }, {
385
+ key: '错误类型',
386
+ value: (_context5.t0 === null || _context5.t0 === void 0 ? void 0 : _context5.t0.name) || '未知错误类型'
387
+ }]
388
+ });
376
389
  setSubmitLoading(false);
377
390
  payCallback({
378
391
  key: 'fail',
@@ -382,7 +395,7 @@ var ToCPay = function ToCPay(props, ref) {
382
395
  fn: 'paymentInit'
383
396
  }
384
397
  });
385
- case 14:
398
+ case 15:
386
399
  case "end":
387
400
  return _context5.stop();
388
401
  }
@@ -479,39 +492,58 @@ var ToCPay = function ToCPay(props, ref) {
479
492
  */
480
493
  var onSubmit = /*#__PURE__*/function () {
481
494
  var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(newOrderId) {
482
- var _state$payGroup9;
483
- var newPayGroup, result;
495
+ var _state$payGroup9, newPayGroup, result;
484
496
  return _regeneratorRuntime().wrap(function _callee7$(_context7) {
485
497
  while (1) switch (_context7.prev = _context7.next) {
486
498
  case 0:
499
+ _context7.prev = 0;
487
500
  newPayGroup = state.payGroup; // 是否要展示无痕模式提示
488
- _context7.next = 3;
501
+ _context7.next = 4;
489
502
  return getIsShowDetectIncognitoConfirm(newPayGroup);
490
- case 3:
503
+ case 4:
491
504
  result = _context7.sent;
492
505
  if (!result) {
493
- _context7.next = 7;
506
+ _context7.next = 8;
494
507
  break;
495
508
  }
496
509
  setShowDetectIncognitoConfirm(true);
497
510
  return _context7.abrupt("return");
498
- case 7:
511
+ case 8:
499
512
  if ((_state$payGroup9 = state.payGroup) !== null && _state$payGroup9 !== void 0 && _state$payGroup9.payment_group_id) {
500
- _context7.next = 11;
513
+ _context7.next = 12;
501
514
  break;
502
515
  }
503
- _context7.next = 10;
516
+ _context7.next = 11;
504
517
  return paymentInit(newOrderId);
505
- case 10:
506
- newPayGroup = _context7.sent;
507
518
  case 11:
519
+ newPayGroup = _context7.sent;
520
+ case 12:
508
521
  // 调用支付
509
522
  handlePaymentByType(undefined, newPayGroup);
510
- case 12:
523
+ _context7.next = 19;
524
+ break;
525
+ case 15:
526
+ _context7.prev = 15;
527
+ _context7.t0 = _context7["catch"](0);
528
+ console.log('err', _context7.t0);
529
+ sendWarningLog({
530
+ title: '提交支付失败 onSubmit catch',
531
+ content: [{
532
+ key: '错误信息',
533
+ value: (_context7.t0 === null || _context7.t0 === void 0 ? void 0 : _context7.t0.message) || '未知错误'
534
+ }, {
535
+ key: '错误堆栈',
536
+ value: (_context7.t0 === null || _context7.t0 === void 0 ? void 0 : _context7.t0.stack) || '无堆栈信息'
537
+ }, {
538
+ key: '错误类型',
539
+ value: (_context7.t0 === null || _context7.t0 === void 0 ? void 0 : _context7.t0.name) || '未知错误类型'
540
+ }]
541
+ });
542
+ case 19:
511
543
  case "end":
512
544
  return _context7.stop();
513
545
  }
514
- }, _callee7);
546
+ }, _callee7, null, [[0, 15]]);
515
547
  }));
516
548
  return function onSubmit(_x8) {
517
549
  return _ref8.apply(this, arguments);
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface FormState {
3
2
  platform: 'pc' | 'h5' | '' | undefined;
4
3
  order: any;
@@ -29,11 +28,4 @@ export interface PayGroup {
29
28
  pay_number?: string;
30
29
  _order: any;
31
30
  }
32
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
33
- state: FormState;
34
- } & {
35
- dispatch: (params: {
36
- type: string;
37
- payload: any;
38
- }) => void;
39
- }>;
31
+ export declare const Provider: any, Context: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface InfoProps {
3
2
  relation_id: any;
4
3
  action: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CalendarDataItem, ScheduleItem } from "./type";
3
2
  import dayjs from "dayjs";
4
3
  export interface FormState {
@@ -69,11 +68,4 @@ export interface FormState {
69
68
  };
70
69
  setGlobalState: Function | null;
71
70
  }
72
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
73
- state: FormState;
74
- } & {
75
- dispatch: (params: {
76
- type: string;
77
- payload: any;
78
- }) => void;
79
- }>;
71
+ export declare const Provider: any, Context: any;
@@ -164,7 +164,7 @@ export var _formatBookingDetail = function _formatBookingDetail(data, modalState
164
164
  });
165
165
  };
166
166
  var TicketBooking = function TicketBooking() {
167
- var _engineContext$appHel2;
167
+ var _engineContext$appHel2, _state$modalState2;
168
168
  var _useStore = useStore(),
169
169
  _useStore2 = _slicedToArray(_useStore, 2),
170
170
  state = _useStore2[0],
@@ -371,7 +371,7 @@ var TicketBooking = function TicketBooking() {
371
371
  fees: fees
372
372
  }
373
373
  });
374
- }, [state.modalState]);
374
+ }, [state === null || state === void 0 || (_state$modalState2 = state.modalState) === null || _state$modalState2 === void 0 || (_state$modalState2 = _state$modalState2.service) === null || _state$modalState2 === void 0 ? void 0 : _state$modalState2.value]);
375
375
 
376
376
  /**
377
377
  * 设置弹窗内的状态
@@ -1,13 +1 @@
1
- /// <reference types="react" />
2
- interface RechargeState {
3
- addWalletCard: any;
4
- }
5
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
6
- walletDetailState: RechargeState;
7
- } & {
8
- dispatch: (params: {
9
- type: string;
10
- payload: any;
11
- }) => void;
12
- }>;
13
- export {};
1
+ export declare const Provider: any, Context: any;