@pisell/private-materials 6.3.123 → 6.3.125
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.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +4 -4
- package/build/lowcode/render/default/view.js +4 -4
- package/build/lowcode/view.js +4 -4
- package/es/components/booking/addons/model.d.ts +10 -1
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/model.d.ts +9 -1
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/eftposPay/amount.js +15 -1
- package/es/components/eftposPay/app.js +2 -1
- package/es/components/eftposPay/component/fail/failCustom.js +12 -4
- package/es/components/eftposPay/component/fail/index.js +14 -6
- package/es/components/eftposPay/component/fail/network.js +3 -0
- package/es/components/eftposPay/component/fail/unknow.js +8 -0
- package/es/components/eftposPay/component/manual/index.js +13 -1
- package/es/components/eftposPay/component/signature/index.js +3 -0
- package/es/components/eftposPay/device.js +33 -22
- package/es/components/eftposPay/index.js +48 -11
- package/es/components/eftposPay/linkly/hooks/normal.js +21 -68
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +20 -81
- package/es/components/eftposPay/linkly/index.js +10 -23
- package/es/components/eftposPay/pay.js +14 -7
- package/es/components/eftposPay/payo/config.js +38 -5
- package/es/components/eftposPay/payo/hooks.js +3 -12
- package/es/components/eftposPay/payo/payment.js +69 -136
- package/es/components/eftposPay/tip.js +5 -0
- package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/es/components/eftposPay/tyro/index.js +44 -11
- package/es/components/eftposPay/utils/payLog.d.ts +81 -0
- package/es/components/eftposPay/utils/payLog.js +430 -0
- package/es/components/eftposPay/windcave/receiptAction.js +5 -0
- package/es/components/eftposPay/windcave/windcave.js +28 -29
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +0 -5
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +142 -165
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -6
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +3 -3
- package/es/components/pay/toC/WalletPassBlock/index.js +1 -3
- package/es/components/pay/toC/index.js +31 -65
- package/es/components/pay/toC/model.d.ts +9 -2
- package/es/components/pay/toC/serve.d.ts +0 -18
- package/es/components/pay/toC/serve.js +15 -42
- package/es/components/pay/toC/utils.d.ts +2 -2
- package/es/components/pay/toC/utils.js +0 -4
- package/es/components/schedules/model.d.ts +9 -1
- package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/es/hooks/usePaymentLogger.d.ts +0 -1
- package/es/plus/selectHolder/components/ErrorTip/index.d.ts +0 -1
- package/es/pro/Login2.0/components/phoneValidation.js +65 -58
- package/lib/components/booking/addons/model.d.ts +10 -1
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/model.d.ts +9 -1
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/eftposPay/amount.js +13 -1
- package/lib/components/eftposPay/app.js +2 -1
- package/lib/components/eftposPay/component/fail/failCustom.js +10 -2
- package/lib/components/eftposPay/component/fail/index.js +10 -2
- package/lib/components/eftposPay/component/fail/network.js +3 -0
- package/lib/components/eftposPay/component/fail/unknow.js +8 -0
- package/lib/components/eftposPay/component/manual/index.js +10 -0
- package/lib/components/eftposPay/component/signature/index.js +3 -0
- package/lib/components/eftposPay/device.js +11 -10
- package/lib/components/eftposPay/index.js +36 -11
- package/lib/components/eftposPay/linkly/hooks/normal.js +22 -43
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +13 -65
- package/lib/components/eftposPay/linkly/index.js +7 -10
- package/lib/components/eftposPay/pay.js +9 -1
- package/lib/components/eftposPay/payo/config.js +15 -8
- package/lib/components/eftposPay/payo/hooks.js +12 -10
- package/lib/components/eftposPay/payo/payment.js +31 -65
- package/lib/components/eftposPay/tip.js +5 -0
- package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/lib/components/eftposPay/tyro/index.js +21 -17
- package/lib/components/eftposPay/utils/payLog.d.ts +81 -0
- package/lib/components/eftposPay/utils/payLog.js +320 -0
- package/lib/components/eftposPay/windcave/receiptAction.js +5 -0
- package/lib/components/eftposPay/windcave/windcave.js +18 -20
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +0 -5
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +100 -90
- package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -6
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -2
- package/lib/components/pay/toC/WalletPassBlock/index.js +1 -3
- package/lib/components/pay/toC/index.js +19 -52
- package/lib/components/pay/toC/model.d.ts +9 -2
- package/lib/components/pay/toC/serve.d.ts +0 -18
- package/lib/components/pay/toC/serve.js +0 -6
- package/lib/components/pay/toC/utils.d.ts +2 -2
- package/lib/components/pay/toC/utils.js +2 -6
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/lib/hooks/usePaymentLogger.d.ts +0 -1
- package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +0 -1
- package/lib/pro/Login2.0/components/phoneValidation.js +4 -2
- package/package.json +2 -2
|
@@ -23,14 +23,13 @@ import PayAmount from "./PayAmount";
|
|
|
23
23
|
import WalletPassBlock from "./WalletPassBlock";
|
|
24
24
|
import PaymentList from "./PaymentList";
|
|
25
25
|
import PaymentMethods from "./PaymentMethods";
|
|
26
|
-
import { getPaymentsAndWalletPass, getPaymentInit, getWalletNameAndPopupStatus,
|
|
26
|
+
import { getPaymentsAndWalletPass, getPaymentInit, getWalletNameAndPopupStatus, checkPendingPayment } from "./serve";
|
|
27
27
|
import { Provider, Context } from "./model";
|
|
28
28
|
import useEngineContext from "../../../hooks/useEngineContext";
|
|
29
29
|
import usePaymentLogger from "../../../hooks/usePaymentLogger";
|
|
30
30
|
import { request } from "../../../utils";
|
|
31
31
|
import { removePayGroupFromStorage } from "./payGroup";
|
|
32
32
|
import localeTexts from "./locales";
|
|
33
|
-
import { getMachineCodeList } from "./PaymentMethods/WalletPass/serve";
|
|
34
33
|
import { getIsWalletPassAndTripartitePayment } from "./utils";
|
|
35
34
|
import { saleChannelMap } from "./status";
|
|
36
35
|
import "./index.less";
|
|
@@ -287,7 +286,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
287
286
|
*/
|
|
288
287
|
var _getPaymentsAndWalletPass = /*#__PURE__*/function () {
|
|
289
288
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(order) {
|
|
290
|
-
var
|
|
289
|
+
var _state$payGroup2, _paymentListRef$curre, data, _ref4, _ref4$remain_amount, remain_amount, wallet_pass_recommend_list, wallet_pass_amount, payment_list, walletPass, withCustomerIdList;
|
|
291
290
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
292
291
|
while (1) switch (_context3.prev = _context3.next) {
|
|
293
292
|
case 0:
|
|
@@ -300,79 +299,46 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
300
299
|
});
|
|
301
300
|
_context3.prev = 1;
|
|
302
301
|
_context3.next = 4;
|
|
303
|
-
return
|
|
302
|
+
return getPaymentsAndWalletPass({
|
|
304
303
|
order_id: order.order_id,
|
|
305
304
|
total_amount: order.amount,
|
|
306
305
|
sale_channel: order.sale_channel || 'online-store'
|
|
307
|
-
}), getMachineCodeList({
|
|
308
|
-
order_id: order.order_id,
|
|
309
|
-
available: 2,
|
|
310
|
-
prepare_payments: [],
|
|
311
|
-
filter_prepare_wallet_pass: 1,
|
|
312
|
-
sale_channel: ((_order$_order = order._order) === null || _order$_order === void 0 ? void 0 : _order$_order.sale_channel) || 'online-store',
|
|
313
|
-
other_exact_codes: []
|
|
314
|
-
}), getOrderBasicDetail(order.order_id)]);
|
|
315
|
-
case 4:
|
|
316
|
-
_yield$Promise$all = _context3.sent;
|
|
317
|
-
_yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 3);
|
|
318
|
-
data = _yield$Promise$all2[0];
|
|
319
|
-
allList = _yield$Promise$all2[1];
|
|
320
|
-
orderBasicDetail = _yield$Promise$all2[2];
|
|
321
|
-
_ref4 = data || {}, _ref4$remain_amount = _ref4.remain_amount, remain_amount = _ref4$remain_amount === void 0 ? 0 : _ref4$remain_amount, wallet_pass_recommend_list = _ref4.wallet_pass_recommend_list, wallet_pass_amount = _ref4.wallet_pass_amount, payment_list = _ref4.payment_list, walletPass = _ref4.walletPass;
|
|
322
|
-
products = (orderBasicDetail.detail || []).map(function (item) {
|
|
323
|
-
var _ref5;
|
|
324
|
-
return _objectSpread(_objectSpread({}, item), {}, {
|
|
325
|
-
is_price_include_tax: orderBasicDetail.is_price_include_tax,
|
|
326
|
-
product_bundle: (_ref5 = item.product_bundle || []) === null || _ref5 === void 0 ? void 0 : _ref5.map(function (bundle) {
|
|
327
|
-
return _objectSpread(_objectSpread({}, bundle), {}, {
|
|
328
|
-
is_price_include_tax: orderBasicDetail.is_price_include_tax
|
|
329
|
-
});
|
|
330
|
-
})
|
|
331
|
-
});
|
|
332
|
-
});
|
|
333
|
-
_res = utils.walletPassEvaluator.getRecommendedVouchers({
|
|
334
|
-
orderTotalAmount: Math.min(orderBasicDetail.product_unpaid_total_pay_amount, order.amount),
|
|
335
|
-
products: products,
|
|
336
|
-
vouchers: allList || []
|
|
337
306
|
});
|
|
338
|
-
|
|
307
|
+
case 4:
|
|
308
|
+
data = _context3.sent;
|
|
309
|
+
_ref4 = data || {}, _ref4$remain_amount = _ref4.remain_amount, remain_amount = _ref4$remain_amount === void 0 ? 0 : _ref4$remain_amount, wallet_pass_recommend_list = _ref4.wallet_pass_recommend_list, wallet_pass_amount = _ref4.wallet_pass_amount, payment_list = _ref4.payment_list, walletPass = _ref4.walletPass; // 记录获取到的数据
|
|
339
310
|
paymentLogger.addLog({
|
|
340
311
|
key: '支付数据获取',
|
|
341
312
|
value: ''
|
|
342
313
|
});
|
|
343
|
-
|
|
314
|
+
withCustomerIdList = (wallet_pass_recommend_list || []).map(function (item) {
|
|
315
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
316
|
+
customer_id: customer_id || item.customer_id
|
|
317
|
+
});
|
|
318
|
+
}); // 设置交易组
|
|
344
319
|
dispatch({
|
|
345
320
|
type: 'setPayGroup',
|
|
346
321
|
payload: {
|
|
347
322
|
// ...state.payGroup,
|
|
348
323
|
order_id: order === null || order === void 0 ? void 0 : order.order_id,
|
|
349
324
|
// total_amount: order?.amount,
|
|
350
|
-
orderDetail: orderBasicDetail,
|
|
351
325
|
// 原订单信息
|
|
352
326
|
_order: order,
|
|
353
327
|
payment_group_id: order === null || order === void 0 ? void 0 : order.payment_group_id,
|
|
354
328
|
// 支付方式没有walletPass时walletPass设置null
|
|
355
329
|
walletPass: walletPass ? _objectSpread(_objectSpread(_objectSpread({}, (_state$payGroup2 = state.payGroup) === null || _state$payGroup2 === void 0 ? void 0 : _state$payGroup2.walletPass), walletPass), {}, {
|
|
356
|
-
|
|
357
|
-
cards:
|
|
358
|
-
// 推荐金额
|
|
359
|
-
amount: recommendedAmount,
|
|
360
|
-
// 不可用钱包
|
|
361
|
-
noApplicableVoucher: noApplicableVoucher,
|
|
362
|
-
// 转换列表
|
|
363
|
-
transformList: transformList
|
|
364
|
-
// amount: wallet_pass_amount,
|
|
365
|
-
// cards: wallet_pass_recommend_list,
|
|
330
|
+
amount: wallet_pass_amount,
|
|
331
|
+
cards: withCustomerIdList
|
|
366
332
|
}) : null,
|
|
367
333
|
total_amount: order === null || order === void 0 ? void 0 : order.amount,
|
|
368
|
-
wait_amount:
|
|
334
|
+
wait_amount: remain_amount
|
|
369
335
|
}
|
|
370
336
|
});
|
|
371
337
|
|
|
372
338
|
// 初始化支付列表
|
|
373
|
-
_context3.next =
|
|
339
|
+
_context3.next = 11;
|
|
374
340
|
return (_paymentListRef$curre = paymentListRef.current) === null || _paymentListRef$curre === void 0 ? void 0 : _paymentListRef$curre.init(payment_list, remain_amount || 0);
|
|
375
|
-
case
|
|
341
|
+
case 11:
|
|
376
342
|
// 解除loading
|
|
377
343
|
setTimeout(function () {
|
|
378
344
|
setLoading(false);
|
|
@@ -383,10 +349,10 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
383
349
|
key: '获取支付列表成功',
|
|
384
350
|
value: ''
|
|
385
351
|
});
|
|
386
|
-
_context3.next =
|
|
352
|
+
_context3.next = 21;
|
|
387
353
|
break;
|
|
388
|
-
case
|
|
389
|
-
_context3.prev =
|
|
354
|
+
case 15:
|
|
355
|
+
_context3.prev = 15;
|
|
390
356
|
_context3.t0 = _context3["catch"](1);
|
|
391
357
|
console.log('err', _context3.t0);
|
|
392
358
|
|
|
@@ -409,11 +375,11 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
409
375
|
fn: '_getPaymentsAndWalletPass'
|
|
410
376
|
}
|
|
411
377
|
});
|
|
412
|
-
case
|
|
378
|
+
case 21:
|
|
413
379
|
case "end":
|
|
414
380
|
return _context3.stop();
|
|
415
381
|
}
|
|
416
|
-
}, _callee3, null, [[1,
|
|
382
|
+
}, _callee3, null, [[1, 15]]);
|
|
417
383
|
}));
|
|
418
384
|
return function _getPaymentsAndWalletPass(_x3) {
|
|
419
385
|
return _ref3.apply(this, arguments);
|
|
@@ -430,7 +396,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
430
396
|
* @Date: 2024-08-16 10:46
|
|
431
397
|
*/
|
|
432
398
|
var handlePaymentByType = /*#__PURE__*/function () {
|
|
433
|
-
var
|
|
399
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(type, payGroup) {
|
|
434
400
|
var _state$payGroup3;
|
|
435
401
|
var paymentType, currentPayGroup, _paymentMethodsRef$cu;
|
|
436
402
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
@@ -490,7 +456,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
490
456
|
}, _callee4, null, [[3, 12]]);
|
|
491
457
|
}));
|
|
492
458
|
return function handlePaymentByType(_x4, _x5) {
|
|
493
|
-
return
|
|
459
|
+
return _ref5.apply(this, arguments);
|
|
494
460
|
};
|
|
495
461
|
}();
|
|
496
462
|
|
|
@@ -502,7 +468,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
502
468
|
* @Date: 2024-08-15 13:41
|
|
503
469
|
*/
|
|
504
470
|
var paymentInit = /*#__PURE__*/function () {
|
|
505
|
-
var
|
|
471
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(newOrderId) {
|
|
506
472
|
var _state$payGroup4;
|
|
507
473
|
var orderId, _state$payGroup5, data;
|
|
508
474
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
@@ -576,7 +542,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
576
542
|
}, _callee5, null, [[3, 12]]);
|
|
577
543
|
}));
|
|
578
544
|
return function paymentInit(_x6) {
|
|
579
|
-
return
|
|
545
|
+
return _ref6.apply(this, arguments);
|
|
580
546
|
};
|
|
581
547
|
}();
|
|
582
548
|
|
|
@@ -635,7 +601,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
635
601
|
* @Date: 2024-08-30 10:23:48
|
|
636
602
|
*/
|
|
637
603
|
var getIsShowDetectIncognitoConfirm = /*#__PURE__*/function () {
|
|
638
|
-
var
|
|
604
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(payGroup) {
|
|
639
605
|
var _yield$detectIncognit, isPrivate;
|
|
640
606
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
641
607
|
while (1) switch (_context6.prev = _context6.next) {
|
|
@@ -653,7 +619,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
653
619
|
}, _callee6);
|
|
654
620
|
}));
|
|
655
621
|
return function getIsShowDetectIncognitoConfirm(_x7) {
|
|
656
|
-
return
|
|
622
|
+
return _ref7.apply(this, arguments);
|
|
657
623
|
};
|
|
658
624
|
}();
|
|
659
625
|
|
|
@@ -665,7 +631,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
665
631
|
* @Date: 2024-08-15 13:25
|
|
666
632
|
*/
|
|
667
633
|
var onSubmit = /*#__PURE__*/function () {
|
|
668
|
-
var
|
|
634
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(newOrderId) {
|
|
669
635
|
var _state$payGroup10, _state$payGroup11, _state$payGroup12;
|
|
670
636
|
var newPayGroup, _state$payGroup13, _newPayGroup, _newPayGroup2, _state$payGroup14, result, _state$payGroup15;
|
|
671
637
|
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
@@ -743,7 +709,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
743
709
|
}, _callee7, null, [[2, 20]]);
|
|
744
710
|
}));
|
|
745
711
|
return function onSubmit(_x8) {
|
|
746
|
-
return
|
|
712
|
+
return _ref8.apply(this, arguments);
|
|
747
713
|
};
|
|
748
714
|
}();
|
|
749
715
|
|
|
@@ -800,7 +766,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
800
766
|
* @Date: 2024-08-09 14:25
|
|
801
767
|
*/
|
|
802
768
|
var payCallback = /*#__PURE__*/function () {
|
|
803
|
-
var
|
|
769
|
+
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(res) {
|
|
804
770
|
var _res$data, _state$payGroup20, _props$callback;
|
|
805
771
|
var orderId, _res$data2;
|
|
806
772
|
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
@@ -840,7 +806,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
840
806
|
}, _callee8);
|
|
841
807
|
}));
|
|
842
808
|
return function payCallback(_x9) {
|
|
843
|
-
return
|
|
809
|
+
return _ref9.apply(this, arguments);
|
|
844
810
|
};
|
|
845
811
|
}();
|
|
846
812
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export interface FormState {
|
|
2
3
|
platform: 'pc' | 'h5' | '' | undefined;
|
|
3
4
|
order: any;
|
|
@@ -28,6 +29,12 @@ export interface PayGroup {
|
|
|
28
29
|
pay_number?: string;
|
|
29
30
|
_order: any;
|
|
30
31
|
front_order_uuid?: string;
|
|
31
|
-
orderDetail: any;
|
|
32
32
|
}
|
|
33
|
-
export declare const Provider: any, Context:
|
|
33
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
34
|
+
state: FormState;
|
|
35
|
+
} & {
|
|
36
|
+
dispatch: (params: {
|
|
37
|
+
type: string;
|
|
38
|
+
payload: any;
|
|
39
|
+
}) => void;
|
|
40
|
+
}>;
|
|
@@ -62,23 +62,6 @@ export declare const getWalletNameAndPopupStatus: (values: {
|
|
|
62
62
|
* @description: 获取支付结果
|
|
63
63
|
*/
|
|
64
64
|
export declare const getPaymentResult: (values: any) => Promise<any>;
|
|
65
|
-
declare type OrderBasicDetail = {
|
|
66
|
-
id: number;
|
|
67
|
-
status: string;
|
|
68
|
-
payment_status: string;
|
|
69
|
-
order_time: string;
|
|
70
|
-
detail: any[];
|
|
71
|
-
product_unpaid_total_pay_amount: number;
|
|
72
|
-
product_paid_total_pay_amount: number;
|
|
73
|
-
is_price_include_tax: 1 | 0;
|
|
74
|
-
};
|
|
75
|
-
/**
|
|
76
|
-
* @title: 查询订单基础信息和订单商品信息
|
|
77
|
-
* @description: 查询订单基础信息和订单商品信息
|
|
78
|
-
* @param {string} order_id
|
|
79
|
-
* @return {*}
|
|
80
|
-
*/
|
|
81
|
-
export declare const getOrderBasicDetail: (order_id: string) => Promise<OrderBasicDetail>;
|
|
82
65
|
/**
|
|
83
66
|
* @title: 检测订单是否有正在处理中的交易
|
|
84
67
|
* @param {object} values - { order_id: string }
|
|
@@ -89,4 +72,3 @@ export declare const checkPendingPayment: (values: {
|
|
|
89
72
|
}) => Promise<{
|
|
90
73
|
has_pending: boolean;
|
|
91
74
|
}>;
|
|
92
|
-
export {};
|
|
@@ -186,69 +186,42 @@ export var getWalletNameAndPopupStatus = /*#__PURE__*/function () {
|
|
|
186
186
|
export var getPaymentResult = function getPaymentResult(values) {
|
|
187
187
|
return request.getRequest().get("/h5/pay/order/payment/result", values);
|
|
188
188
|
};
|
|
189
|
-
|
|
190
|
-
* @title: 查询订单基础信息和订单商品信息
|
|
191
|
-
* @description: 查询订单基础信息和订单商品信息
|
|
192
|
-
* @param {string} order_id
|
|
193
|
-
* @return {*}
|
|
194
|
-
*/
|
|
195
|
-
export var getOrderBasicDetail = /*#__PURE__*/function () {
|
|
196
|
-
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(order_id) {
|
|
197
|
-
var _yield$request$getReq5, data;
|
|
198
|
-
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
199
|
-
while (1) switch (_context5.prev = _context5.next) {
|
|
200
|
-
case 0:
|
|
201
|
-
_context5.next = 2;
|
|
202
|
-
return request.getRequest().get("/h5/order/order/".concat(order_id, "/basic-detail"), {});
|
|
203
|
-
case 2:
|
|
204
|
-
_yield$request$getReq5 = _context5.sent;
|
|
205
|
-
data = _yield$request$getReq5.data;
|
|
206
|
-
return _context5.abrupt("return", data);
|
|
207
|
-
case 5:
|
|
208
|
-
case "end":
|
|
209
|
-
return _context5.stop();
|
|
210
|
-
}
|
|
211
|
-
}, _callee5);
|
|
212
|
-
}));
|
|
213
|
-
return function getOrderBasicDetail(_x5) {
|
|
214
|
-
return _ref5.apply(this, arguments);
|
|
215
|
-
};
|
|
216
|
-
}();
|
|
189
|
+
|
|
217
190
|
/**
|
|
218
191
|
* @title: 检测订单是否有正在处理中的交易
|
|
219
192
|
* @param {object} values - { order_id: string }
|
|
220
193
|
* @return {Promise<{ has_pending: boolean }>}
|
|
221
194
|
*/
|
|
222
195
|
export var checkPendingPayment = /*#__PURE__*/function () {
|
|
223
|
-
var
|
|
196
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(values) {
|
|
224
197
|
var _data$payment_handlin;
|
|
225
|
-
var _yield$request$
|
|
226
|
-
return _regeneratorRuntime().wrap(function
|
|
227
|
-
while (1) switch (
|
|
198
|
+
var _yield$request$getReq5, data;
|
|
199
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
200
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
228
201
|
case 0:
|
|
229
|
-
|
|
202
|
+
_context5.next = 2;
|
|
230
203
|
return request.getRequest().post("/h5/pay/payment/check", values);
|
|
231
204
|
case 2:
|
|
232
|
-
_yield$request$
|
|
233
|
-
data = _yield$request$
|
|
205
|
+
_yield$request$getReq5 = _context5.sent;
|
|
206
|
+
data = _yield$request$getReq5.data;
|
|
234
207
|
if (!(data !== null && data !== void 0 && data.payment_handling_list && (data === null || data === void 0 || (_data$payment_handlin = data.payment_handling_list) === null || _data$payment_handlin === void 0 ? void 0 : _data$payment_handlin.length) > 0)) {
|
|
235
|
-
|
|
208
|
+
_context5.next = 6;
|
|
236
209
|
break;
|
|
237
210
|
}
|
|
238
|
-
return
|
|
211
|
+
return _context5.abrupt("return", {
|
|
239
212
|
has_pending: true
|
|
240
213
|
});
|
|
241
214
|
case 6:
|
|
242
|
-
return
|
|
215
|
+
return _context5.abrupt("return", {
|
|
243
216
|
has_pending: false
|
|
244
217
|
});
|
|
245
218
|
case 7:
|
|
246
219
|
case "end":
|
|
247
|
-
return
|
|
220
|
+
return _context5.stop();
|
|
248
221
|
}
|
|
249
|
-
},
|
|
222
|
+
}, _callee5);
|
|
250
223
|
}));
|
|
251
|
-
return function checkPendingPayment(
|
|
252
|
-
return
|
|
224
|
+
return function checkPendingPayment(_x5) {
|
|
225
|
+
return _ref5.apply(this, arguments);
|
|
253
226
|
};
|
|
254
227
|
}();
|
|
@@ -22,7 +22,7 @@ export declare const formatWalletPassParams: (payGroup: PayGroup) => {
|
|
|
22
22
|
order_id: string;
|
|
23
23
|
payment_group_id: number;
|
|
24
24
|
payments: {
|
|
25
|
-
amount: string
|
|
25
|
+
amount: string;
|
|
26
26
|
wallet_pass_use_value: any;
|
|
27
27
|
voucher_id: any;
|
|
28
28
|
tag: any;
|
|
@@ -48,7 +48,7 @@ export declare const isFranchiseeShop: (path?: any, history?: any) => any;
|
|
|
48
48
|
*/
|
|
49
49
|
export declare const getFranchiseeShopId: (path?: any, history?: any) => number;
|
|
50
50
|
export declare const formatFranchiseeRoute: (url: string, history?: any) => string;
|
|
51
|
-
export declare const getAvailableMaxAmount: (data: WalletPassDataType) => string
|
|
51
|
+
export declare const getAvailableMaxAmount: (data: WalletPassDataType) => string;
|
|
52
52
|
export declare const clientPayment: (params: {
|
|
53
53
|
order_id: number;
|
|
54
54
|
type: "aliPay" | "wxPay" | 'google_pay';
|
|
@@ -6,7 +6,6 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
6
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
7
|
import { Decimal } from 'decimal.js';
|
|
8
8
|
import { isTripartitePayment } from "./status";
|
|
9
|
-
import { isNumber } from "@pisell/utils";
|
|
10
9
|
import dayjs from "dayjs";
|
|
11
10
|
import { getUniqueId } from "@pisell/utils";
|
|
12
11
|
/**
|
|
@@ -98,9 +97,6 @@ export var formatFranchiseeRoute = function formatFranchiseeRoute(url, history)
|
|
|
98
97
|
|
|
99
98
|
// 获取walletPass可用最大金额
|
|
100
99
|
export var getAvailableMaxAmount = function getAvailableMaxAmount(data) {
|
|
101
|
-
if (isNumber(data._available_max_amount)) {
|
|
102
|
-
return data._available_max_amount;
|
|
103
|
-
}
|
|
104
100
|
return data.tag !== 'point_card' ? data.available_max_amount : data === null || data === void 0 ? void 0 : data.recommended_usage_amount;
|
|
105
101
|
};
|
|
106
102
|
export var clientPayment = function clientPayment(params) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { CalendarDataItem, ScheduleItem } from "./type";
|
|
2
3
|
import dayjs from "dayjs";
|
|
3
4
|
export interface FormState {
|
|
@@ -68,4 +69,11 @@ export interface FormState {
|
|
|
68
69
|
};
|
|
69
70
|
setGlobalState: Function | null;
|
|
70
71
|
}
|
|
71
|
-
export declare const Provider: any, Context:
|
|
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
|
+
}>;
|
|
@@ -12,7 +12,7 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|
|
12
12
|
*/
|
|
13
13
|
export var validatePhoneNumber = /*#__PURE__*/function () {
|
|
14
14
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(value, getText) {
|
|
15
|
-
var phone, countryCode, match;
|
|
15
|
+
var phone, countryCode, match, usCanadaReg, auReg;
|
|
16
16
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
17
17
|
while (1) switch (_context.prev = _context.next) {
|
|
18
18
|
case 0:
|
|
@@ -55,7 +55,7 @@ export var validatePhoneNumber = /*#__PURE__*/function () {
|
|
|
55
55
|
throw new Error(getText('pisell-phone-validation-required'));
|
|
56
56
|
case 16:
|
|
57
57
|
_context.t0 = countryCode;
|
|
58
|
-
_context.next = _context.t0 === '86' ? 19 : _context.t0 === '852' ? 22 : _context.t0 === '853' ? 25 : _context.t0 === '886' ? 28 : _context.t0 === '1' ? 31 : _context.t0 === '44' ?
|
|
58
|
+
_context.next = _context.t0 === '86' ? 19 : _context.t0 === '852' ? 22 : _context.t0 === '853' ? 25 : _context.t0 === '886' ? 28 : _context.t0 === '1' ? 31 : _context.t0 === '44' ? 35 : _context.t0 === '61' ? 38 : _context.t0 === '81' ? 42 : _context.t0 === '82' ? 45 : _context.t0 === '65' ? 48 : _context.t0 === '60' ? 51 : _context.t0 === '66' ? 54 : _context.t0 === '84' ? 57 : _context.t0 === '63' ? 60 : _context.t0 === '62' ? 63 : _context.t0 === '91' ? 66 : 69;
|
|
59
59
|
break;
|
|
60
60
|
case 19:
|
|
61
61
|
if (/^1[3-9]\d{9}$/.test(phone)) {
|
|
@@ -64,7 +64,7 @@ export var validatePhoneNumber = /*#__PURE__*/function () {
|
|
|
64
64
|
}
|
|
65
65
|
throw new Error(getText('pisell-phone-validation-china'));
|
|
66
66
|
case 21:
|
|
67
|
-
return _context.abrupt("break",
|
|
67
|
+
return _context.abrupt("break", 72);
|
|
68
68
|
case 22:
|
|
69
69
|
if (/^[5-9]\d{7}$/.test(phone)) {
|
|
70
70
|
_context.next = 24;
|
|
@@ -72,7 +72,7 @@ export var validatePhoneNumber = /*#__PURE__*/function () {
|
|
|
72
72
|
}
|
|
73
73
|
throw new Error(getText('pisell-phone-validation-hongkong'));
|
|
74
74
|
case 24:
|
|
75
|
-
return _context.abrupt("break",
|
|
75
|
+
return _context.abrupt("break", 72);
|
|
76
76
|
case 25:
|
|
77
77
|
if (/^6\d{7}$/.test(phone)) {
|
|
78
78
|
_context.next = 27;
|
|
@@ -80,7 +80,7 @@ export var validatePhoneNumber = /*#__PURE__*/function () {
|
|
|
80
80
|
}
|
|
81
81
|
throw new Error(getText('pisell-phone-validation-macau'));
|
|
82
82
|
case 27:
|
|
83
|
-
return _context.abrupt("break",
|
|
83
|
+
return _context.abrupt("break", 72);
|
|
84
84
|
case 28:
|
|
85
85
|
if (/^9\d{8}$/.test(phone)) {
|
|
86
86
|
_context.next = 30;
|
|
@@ -88,112 +88,119 @@ export var validatePhoneNumber = /*#__PURE__*/function () {
|
|
|
88
88
|
}
|
|
89
89
|
throw new Error(getText('pisell-phone-validation-taiwan'));
|
|
90
90
|
case 30:
|
|
91
|
-
return _context.abrupt("break",
|
|
91
|
+
return _context.abrupt("break", 72);
|
|
92
92
|
case 31:
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
// 美国/加拿大
|
|
94
|
+
// NANP 标准 10 位格式:3位区号[2-9] + 3位局号[2-9] + 4位
|
|
95
|
+
usCanadaReg = /^[2-9]\d{2}[2-9]\d{6}$/;
|
|
96
|
+
if (usCanadaReg.test(phone)) {
|
|
97
|
+
_context.next = 34;
|
|
95
98
|
break;
|
|
96
99
|
}
|
|
97
100
|
throw new Error(getText('pisell-phone-validation-us-canada'));
|
|
98
|
-
case 33:
|
|
99
|
-
return _context.abrupt("break", 70);
|
|
100
101
|
case 34:
|
|
102
|
+
return _context.abrupt("break", 72);
|
|
103
|
+
case 35:
|
|
101
104
|
if (/^7\d{9}$/.test(phone)) {
|
|
102
|
-
_context.next =
|
|
105
|
+
_context.next = 37;
|
|
103
106
|
break;
|
|
104
107
|
}
|
|
105
108
|
throw new Error(getText('pisell-phone-validation-uk'));
|
|
106
|
-
case 36:
|
|
107
|
-
return _context.abrupt("break", 70);
|
|
108
109
|
case 37:
|
|
109
|
-
|
|
110
|
-
|
|
110
|
+
return _context.abrupt("break", 72);
|
|
111
|
+
case 38:
|
|
112
|
+
// 澳大利亚
|
|
113
|
+
// const reg = /^(\+?0)?4\d{8}$/;
|
|
114
|
+
// 固话前缀 02/03/07/08, 手机前缀 04/05, 首位 0 可选
|
|
115
|
+
auReg = /^0?[2-578]\d{8}$/;
|
|
116
|
+
if (auReg.test(phone)) {
|
|
117
|
+
_context.next = 41;
|
|
111
118
|
break;
|
|
112
119
|
}
|
|
113
120
|
throw new Error(getText('pisell-phone-validation-australia'));
|
|
114
|
-
case
|
|
115
|
-
return _context.abrupt("break",
|
|
116
|
-
case
|
|
121
|
+
case 41:
|
|
122
|
+
return _context.abrupt("break", 72);
|
|
123
|
+
case 42:
|
|
117
124
|
if (/^[789]0\d{8}$/.test(phone)) {
|
|
118
|
-
_context.next =
|
|
125
|
+
_context.next = 44;
|
|
119
126
|
break;
|
|
120
127
|
}
|
|
121
128
|
throw new Error(getText('pisell-phone-validation-japan'));
|
|
122
|
-
case
|
|
123
|
-
return _context.abrupt("break",
|
|
124
|
-
case
|
|
129
|
+
case 44:
|
|
130
|
+
return _context.abrupt("break", 72);
|
|
131
|
+
case 45:
|
|
125
132
|
if (/^1[0-9]\d{7,8}$/.test(phone)) {
|
|
126
|
-
_context.next =
|
|
133
|
+
_context.next = 47;
|
|
127
134
|
break;
|
|
128
135
|
}
|
|
129
136
|
throw new Error(getText('pisell-phone-validation-korea'));
|
|
130
|
-
case
|
|
131
|
-
return _context.abrupt("break",
|
|
132
|
-
case
|
|
137
|
+
case 47:
|
|
138
|
+
return _context.abrupt("break", 72);
|
|
139
|
+
case 48:
|
|
133
140
|
if (/^[89]\d{7}$/.test(phone)) {
|
|
134
|
-
_context.next =
|
|
141
|
+
_context.next = 50;
|
|
135
142
|
break;
|
|
136
143
|
}
|
|
137
144
|
throw new Error(getText('pisell-phone-validation-singapore'));
|
|
138
|
-
case
|
|
139
|
-
return _context.abrupt("break",
|
|
140
|
-
case
|
|
145
|
+
case 50:
|
|
146
|
+
return _context.abrupt("break", 72);
|
|
147
|
+
case 51:
|
|
141
148
|
if (/^1[0-9]\d{7,8}$/.test(phone)) {
|
|
142
|
-
_context.next =
|
|
149
|
+
_context.next = 53;
|
|
143
150
|
break;
|
|
144
151
|
}
|
|
145
152
|
throw new Error(getText('pisell-phone-validation-malaysia'));
|
|
146
|
-
case
|
|
147
|
-
return _context.abrupt("break",
|
|
148
|
-
case
|
|
153
|
+
case 53:
|
|
154
|
+
return _context.abrupt("break", 72);
|
|
155
|
+
case 54:
|
|
149
156
|
if (/^[689]\d{8}$/.test(phone)) {
|
|
150
|
-
_context.next =
|
|
157
|
+
_context.next = 56;
|
|
151
158
|
break;
|
|
152
159
|
}
|
|
153
160
|
throw new Error(getText('pisell-phone-validation-thailand'));
|
|
154
|
-
case
|
|
155
|
-
return _context.abrupt("break",
|
|
156
|
-
case
|
|
161
|
+
case 56:
|
|
162
|
+
return _context.abrupt("break", 72);
|
|
163
|
+
case 57:
|
|
157
164
|
if (/^[3579]\d{8}$/.test(phone)) {
|
|
158
|
-
_context.next =
|
|
165
|
+
_context.next = 59;
|
|
159
166
|
break;
|
|
160
167
|
}
|
|
161
168
|
throw new Error(getText('pisell-phone-validation-vietnam'));
|
|
162
|
-
case
|
|
163
|
-
return _context.abrupt("break",
|
|
164
|
-
case
|
|
169
|
+
case 59:
|
|
170
|
+
return _context.abrupt("break", 72);
|
|
171
|
+
case 60:
|
|
165
172
|
if (/^9\d{9}$/.test(phone)) {
|
|
166
|
-
_context.next =
|
|
173
|
+
_context.next = 62;
|
|
167
174
|
break;
|
|
168
175
|
}
|
|
169
176
|
throw new Error(getText('pisell-phone-validation-philippines'));
|
|
170
|
-
case
|
|
171
|
-
return _context.abrupt("break",
|
|
172
|
-
case
|
|
177
|
+
case 62:
|
|
178
|
+
return _context.abrupt("break", 72);
|
|
179
|
+
case 63:
|
|
173
180
|
if (/^8\d{8,11}$/.test(phone)) {
|
|
174
|
-
_context.next =
|
|
181
|
+
_context.next = 65;
|
|
175
182
|
break;
|
|
176
183
|
}
|
|
177
184
|
throw new Error(getText('pisell-phone-validation-indonesia'));
|
|
178
|
-
case
|
|
179
|
-
return _context.abrupt("break",
|
|
180
|
-
case
|
|
185
|
+
case 65:
|
|
186
|
+
return _context.abrupt("break", 72);
|
|
187
|
+
case 66:
|
|
181
188
|
if (/^[6-9]\d{9}$/.test(phone)) {
|
|
182
|
-
_context.next =
|
|
189
|
+
_context.next = 68;
|
|
183
190
|
break;
|
|
184
191
|
}
|
|
185
192
|
throw new Error(getText('pisell-phone-validation-india'));
|
|
186
|
-
case
|
|
187
|
-
return _context.abrupt("break",
|
|
188
|
-
case
|
|
193
|
+
case 68:
|
|
194
|
+
return _context.abrupt("break", 72);
|
|
195
|
+
case 69:
|
|
189
196
|
if (/^\d{6,15}$/.test(phone)) {
|
|
190
|
-
_context.next =
|
|
197
|
+
_context.next = 71;
|
|
191
198
|
break;
|
|
192
199
|
}
|
|
193
200
|
throw new Error(getText('pisell-phone-validation-invalid'));
|
|
194
|
-
case
|
|
195
|
-
return _context.abrupt("break",
|
|
196
|
-
case
|
|
201
|
+
case 71:
|
|
202
|
+
return _context.abrupt("break", 72);
|
|
203
|
+
case 72:
|
|
197
204
|
case "end":
|
|
198
205
|
return _context.stop();
|
|
199
206
|
}
|