@pisell/private-materials 3.0.111 → 3.0.113
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 +19 -11
- package/build/lowcode/assets-dev.json +10 -2
- package/build/lowcode/assets-prod.json +19 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +18 -16
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +18 -16
- package/es/components/booking/addons/index.d.ts +1 -1
- package/es/components/booking/addons/model.d.ts +2 -1
- package/es/components/booking/components/footer/index.js +1 -1
- package/es/components/booking/deposit/DepositItem/index.d.ts +4 -1
- package/es/components/booking/deposit/DepositItem/index.js +17 -6
- package/es/components/booking/deposit/DepositItem/index.less +36 -12
- package/es/components/booking/deposit/index.js +5 -2
- package/es/components/booking/forms/forms.d.ts +1 -1
- package/es/components/booking/forms/index.d.ts +1 -1
- package/es/components/booking/forms/model.d.ts +2 -1
- package/es/components/booking/index.d.ts +1 -1
- package/es/components/booking/info/index.d.ts +1 -1
- package/es/components/booking/info/model.d.ts +2 -1
- package/es/components/booking/info/service/editService/index.js +11 -9
- package/es/components/booking/locales.d.ts +12 -0
- package/es/components/booking/locales.js +12 -0
- package/es/components/booking/model.d.ts +2 -1
- package/es/components/booking/notes/index.d.ts +1 -1
- package/es/components/booking/notes/model.d.ts +2 -1
- package/es/components/booking/payments/index.d.ts +1 -1
- package/es/components/booking/payments/model.d.ts +2 -1
- package/es/components/index.d.ts +2 -1
- package/es/components/index.js +2 -1
- package/es/components/pay/toC/PayAmount/index.d.ts +15 -0
- package/es/components/pay/toC/PayAmount/index.js +25 -0
- package/es/components/pay/toC/PayAmount/index.less +21 -0
- package/es/components/pay/toC/PayCountdown/index.d.ts +15 -0
- package/es/components/pay/toC/PayCountdown/index.js +26 -0
- package/es/components/pay/toC/PayCountdown/index.less +22 -0
- package/es/components/pay/toC/PaymentList/index.d.ts +19 -0
- package/es/components/pay/toC/PaymentList/index.js +342 -0
- package/es/components/pay/toC/PaymentList/index.less +112 -0
- package/es/components/pay/toC/PaymentList/mock.d.ts +88 -0
- package/es/components/pay/toC/PaymentList/mock.js +128 -0
- package/es/components/pay/toC/PaymentList/payment/alipay.svg +13 -0
- package/es/components/pay/toC/PaymentList/payment/apple_pay.svg +7 -0
- package/es/components/pay/toC/PaymentList/payment/bank_deposit.svg +11 -0
- package/es/components/pay/toC/PaymentList/payment/cash.svg +8 -0
- package/es/components/pay/toC/PaymentList/payment/credit_card.svg +10 -0
- package/es/components/pay/toC/PaymentList/payment/custom.svg +10 -0
- package/es/components/pay/toC/PaymentList/payment/google_pay.svg +9 -0
- package/es/components/pay/toC/PaymentList/payment/paypal.svg +8 -0
- package/es/components/pay/toC/PaymentList/payment/stripe.svg +16 -0
- package/es/components/pay/toC/PaymentList/payment/wxpay.svg +5 -0
- package/es/components/pay/toC/PaymentList/serve.d.ts +26 -0
- package/es/components/pay/toC/PaymentList/serve.js +135 -0
- package/es/components/pay/toC/PaymentList/status.d.ts +4 -0
- package/es/components/pay/toC/PaymentList/status.js +100 -0
- package/es/components/pay/toC/PaymentList/utils.d.ts +10 -0
- package/es/components/pay/toC/PaymentList/utils.js +53 -0
- package/es/components/pay/toC/PaymentMethods/ApplePay/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/ApplePay/index.js +113 -0
- package/es/components/pay/toC/PaymentMethods/ApplePay/index.less +0 -0
- package/es/components/pay/toC/PaymentMethods/BankDeposit/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/BankDeposit/index.js +74 -0
- package/es/components/pay/toC/PaymentMethods/BankDeposit/index.less +0 -0
- package/es/components/pay/toC/PaymentMethods/CashManual/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/CashManual/index.js +79 -0
- package/es/components/pay/toC/PaymentMethods/CashManual/index.less +0 -0
- package/es/components/pay/toC/PaymentMethods/CashManual/serve.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/CashManual/serve.js +27 -0
- package/es/components/pay/toC/PaymentMethods/CustomPayment/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/CustomPayment/index.js +78 -0
- package/es/components/pay/toC/PaymentMethods/CustomPayment/index.less +0 -0
- package/es/components/pay/toC/PaymentMethods/CustomPayment/serve.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/CustomPayment/serve.js +27 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.js +109 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.less +0 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/serve.d.ts +2 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/serve.js +41 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.js +109 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.less +0 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayPaypalH5/serve.d.ts +2 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayPaypalH5/serve.js +41 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayQrcode/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayQrcode/index.js +65 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayQrcode/index.less +0 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayQrcode/serve.d.ts +2 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayQrcode/serve.js +36 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayWxH5/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayWxH5/index.js +109 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayWxH5/index.less +0 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayWxH5/serve.d.ts +2 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayWxH5/serve.js +41 -0
- package/es/components/pay/toC/PaymentMethods/GooglePay/index.d.ts +9 -0
- package/es/components/pay/toC/PaymentMethods/GooglePay/index.js +110 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.d.ts +12 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.js +349 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.less +25 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/List/index.d.ts +11 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/List/index.js +375 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/List/index.less +95 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/List/serve.d.ts +5 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/List/serve.js +37 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +4 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.js +21 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.less +24 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.js +222 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.less +0 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/index.d.ts +7 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/index.js +130 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/index.less +0 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.d.ts +61 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +524 -0
- package/es/components/pay/toC/PaymentMethods/OfflinePayment/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/OfflinePayment/index.js +73 -0
- package/es/components/pay/toC/PaymentMethods/OfflinePayment/index.less +0 -0
- package/es/components/pay/toC/PaymentMethods/OfflinePayment/serve.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/OfflinePayment/serve.js +27 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.d.ts +6 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.js +61 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +3 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.js +121 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.less +35 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/serve.d.ts +9 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/serve.js +33 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/DynamicSDK.d.ts +2 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/DynamicSDK.js +30 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +8 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.js +37 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +8 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.js +13 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +3 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.js +15 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.less +27 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/stripe_loading.gif +0 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +3 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.js +108 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +4 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.js +113 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.less +22 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +4 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.js +96 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.module.less +4 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/serve.d.ts +9 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/serve.js +33 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/index.js +78 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/index.less +0 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/serve.d.ts +2 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/serve.js +36 -0
- package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.js +108 -0
- package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.less +0 -0
- package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/serve.d.ts +2 -0
- package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/serve.js +41 -0
- package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.js +109 -0
- package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.less +0 -0
- package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/serve.d.ts +2 -0
- package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/serve.js +41 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +15 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.js +142 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.less +20 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/MultiModeSearch/index.d.ts +6 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/MultiModeSearch/index.js +19 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +20 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +344 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.less +0 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +111 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.js +114 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.d.ts +3 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +40 -0
- package/es/components/pay/toC/PaymentMethods/index.d.ts +9 -0
- package/es/components/pay/toC/PaymentMethods/index.js +316 -0
- package/es/components/pay/toC/WalletPassBlock/index.d.ts +14 -0
- package/es/components/pay/toC/WalletPassBlock/index.js +72 -0
- package/es/components/pay/toC/WalletPassBlock/index.less +65 -0
- package/es/components/pay/toC/index.d.ts +3 -0
- package/es/components/pay/toC/index.js +647 -0
- package/es/components/pay/toC/index.less +22 -0
- package/es/components/pay/toC/locales.d.ts +208 -0
- package/es/components/pay/toC/locales.js +207 -0
- package/es/components/pay/toC/model.d.ts +35 -0
- package/es/components/pay/toC/model.js +43 -0
- package/es/components/pay/toC/payGroup.d.ts +48 -0
- package/es/components/pay/toC/payGroup.js +105 -0
- package/es/components/pay/toC/serve.d.ts +34 -0
- package/es/components/pay/toC/serve.js +148 -0
- package/es/components/pay/toC/status.d.ts +3 -0
- package/es/components/pay/toC/status.js +82 -0
- package/es/components/pay/toC/utils.d.ts +30 -0
- package/es/components/pay/toC/utils.js +48 -0
- package/es/components/schedules/index.d.ts +1 -1
- package/es/components/schedules/model.d.ts +2 -1
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/utils/index.d.ts +6 -5
- package/es/utils/index.js +28 -6
- package/lib/components/booking/addons/index.d.ts +1 -1
- package/lib/components/booking/addons/model.d.ts +2 -1
- package/lib/components/booking/components/footer/index.js +1 -1
- package/lib/components/booking/deposit/DepositItem/index.d.ts +4 -1
- package/lib/components/booking/deposit/DepositItem/index.js +17 -6
- package/lib/components/booking/deposit/DepositItem/index.less +36 -12
- package/lib/components/booking/deposit/index.js +5 -2
- package/lib/components/booking/forms/forms.d.ts +1 -1
- package/lib/components/booking/forms/index.d.ts +1 -1
- package/lib/components/booking/forms/model.d.ts +2 -1
- package/lib/components/booking/index.d.ts +1 -1
- package/lib/components/booking/info/index.d.ts +1 -1
- package/lib/components/booking/info/model.d.ts +2 -1
- package/lib/components/booking/info/service/editService/index.js +2 -0
- package/lib/components/booking/locales.d.ts +12 -0
- package/lib/components/booking/locales.js +12 -0
- package/lib/components/booking/model.d.ts +2 -1
- package/lib/components/booking/notes/index.d.ts +1 -1
- package/lib/components/booking/notes/model.d.ts +2 -1
- package/lib/components/booking/payments/index.d.ts +1 -1
- package/lib/components/booking/payments/model.d.ts +2 -1
- package/lib/components/index.d.ts +2 -1
- package/lib/components/index.js +5 -2
- package/lib/components/pay/toC/PayAmount/index.d.ts +15 -0
- package/lib/components/pay/toC/PayAmount/index.js +42 -0
- package/lib/components/pay/toC/PayAmount/index.less +21 -0
- package/lib/components/pay/toC/PayCountdown/index.d.ts +15 -0
- package/lib/components/pay/toC/PayCountdown/index.js +49 -0
- package/lib/components/pay/toC/PayCountdown/index.less +22 -0
- package/lib/components/pay/toC/PaymentList/index.d.ts +19 -0
- package/lib/components/pay/toC/PaymentList/index.js +256 -0
- package/lib/components/pay/toC/PaymentList/index.less +112 -0
- package/lib/components/pay/toC/PaymentList/mock.d.ts +88 -0
- package/lib/components/pay/toC/PaymentList/mock.js +174 -0
- package/lib/components/pay/toC/PaymentList/payment/alipay.svg +13 -0
- package/lib/components/pay/toC/PaymentList/payment/apple_pay.svg +7 -0
- package/lib/components/pay/toC/PaymentList/payment/bank_deposit.svg +11 -0
- package/lib/components/pay/toC/PaymentList/payment/cash.svg +8 -0
- package/lib/components/pay/toC/PaymentList/payment/credit_card.svg +10 -0
- package/lib/components/pay/toC/PaymentList/payment/custom.svg +10 -0
- package/lib/components/pay/toC/PaymentList/payment/google_pay.svg +9 -0
- package/lib/components/pay/toC/PaymentList/payment/paypal.svg +8 -0
- package/lib/components/pay/toC/PaymentList/payment/stripe.svg +16 -0
- package/lib/components/pay/toC/PaymentList/payment/wxpay.svg +5 -0
- package/lib/components/pay/toC/PaymentList/serve.d.ts +26 -0
- package/lib/components/pay/toC/PaymentList/serve.js +83 -0
- package/lib/components/pay/toC/PaymentList/status.d.ts +4 -0
- package/lib/components/pay/toC/PaymentList/status.js +132 -0
- package/lib/components/pay/toC/PaymentList/utils.d.ts +10 -0
- package/lib/components/pay/toC/PaymentList/utils.js +52 -0
- package/lib/components/pay/toC/PaymentMethods/ApplePay/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/ApplePay/index.js +96 -0
- package/lib/components/pay/toC/PaymentMethods/ApplePay/index.less +0 -0
- package/lib/components/pay/toC/PaymentMethods/BankDeposit/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/BankDeposit/index.js +68 -0
- package/lib/components/pay/toC/PaymentMethods/BankDeposit/index.less +0 -0
- package/lib/components/pay/toC/PaymentMethods/CashManual/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/CashManual/index.js +56 -0
- package/lib/components/pay/toC/PaymentMethods/CashManual/index.less +0 -0
- package/lib/components/pay/toC/PaymentMethods/CashManual/serve.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/CashManual/serve.js +33 -0
- package/lib/components/pay/toC/PaymentMethods/CustomPayment/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/CustomPayment/index.js +56 -0
- package/lib/components/pay/toC/PaymentMethods/CustomPayment/index.less +0 -0
- package/lib/components/pay/toC/PaymentMethods/CustomPayment/serve.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/CustomPayment/serve.js +33 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.js +89 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.less +0 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/serve.d.ts +2 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/serve.js +44 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.js +89 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.less +0 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayPaypalH5/serve.d.ts +2 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayPaypalH5/serve.js +44 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayQrcode/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayQrcode/index.js +61 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayQrcode/index.less +0 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayQrcode/serve.d.ts +2 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayQrcode/serve.js +43 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayWxH5/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayWxH5/index.js +89 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayWxH5/index.less +0 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayWxH5/serve.d.ts +2 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayWxH5/serve.js +44 -0
- package/lib/components/pay/toC/PaymentMethods/GooglePay/index.d.ts +9 -0
- package/lib/components/pay/toC/PaymentMethods/GooglePay/index.js +95 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.d.ts +12 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.js +270 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.less +25 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/List/index.d.ts +11 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/List/index.js +224 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/List/index.less +95 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/List/serve.d.ts +5 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/List/serve.js +39 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +4 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.js +52 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.less +24 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.js +139 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.less +0 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/index.d.ts +7 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/index.js +80 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/index.less +0 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.d.ts +61 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +336 -0
- package/lib/components/pay/toC/PaymentMethods/OfflinePayment/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/OfflinePayment/index.js +53 -0
- package/lib/components/pay/toC/PaymentMethods/OfflinePayment/index.less +0 -0
- package/lib/components/pay/toC/PaymentMethods/OfflinePayment/serve.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/OfflinePayment/serve.js +33 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.d.ts +6 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.js +76 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +3 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.js +107 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.less +35 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/serve.d.ts +9 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/serve.js +30 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/DynamicSDK.d.ts +2 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/DynamicSDK.js +44 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +8 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.js +69 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +8 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.js +44 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +3 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.js +48 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.less +27 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/stripe_loading.gif +0 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +3 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.js +124 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +4 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.js +94 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.less +22 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +4 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.js +81 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.module.less +4 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/serve.d.ts +9 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/serve.js +30 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/index.js +71 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/index.less +0 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/serve.d.ts +2 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/serve.js +43 -0
- package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.js +88 -0
- package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.less +0 -0
- package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/serve.d.ts +2 -0
- package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/serve.js +44 -0
- package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.js +87 -0
- package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.less +0 -0
- package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/serve.d.ts +2 -0
- package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/serve.js +44 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +15 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/List/index.js +126 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/List/index.less +20 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/MultiModeSearch/index.d.ts +6 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/MultiModeSearch/index.js +56 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +20 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +284 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.less +0 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +111 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.js +54 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.d.ts +3 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +70 -0
- package/lib/components/pay/toC/PaymentMethods/index.d.ts +9 -0
- package/lib/components/pay/toC/PaymentMethods/index.js +176 -0
- package/lib/components/pay/toC/WalletPassBlock/index.d.ts +14 -0
- package/lib/components/pay/toC/WalletPassBlock/index.js +97 -0
- package/lib/components/pay/toC/WalletPassBlock/index.less +65 -0
- package/lib/components/pay/toC/index.d.ts +3 -0
- package/lib/components/pay/toC/index.js +366 -0
- package/lib/components/pay/toC/index.less +22 -0
- package/lib/components/pay/toC/locales.d.ts +208 -0
- package/lib/components/pay/toC/locales.js +231 -0
- package/lib/components/pay/toC/model.d.ts +35 -0
- package/lib/components/pay/toC/model.js +60 -0
- package/lib/components/pay/toC/payGroup.d.ts +48 -0
- package/lib/components/pay/toC/payGroup.js +77 -0
- package/lib/components/pay/toC/serve.d.ts +34 -0
- package/lib/components/pay/toC/serve.js +78 -0
- package/lib/components/pay/toC/status.d.ts +3 -0
- package/lib/components/pay/toC/status.js +92 -0
- package/lib/components/pay/toC/utils.d.ts +30 -0
- package/lib/components/pay/toC/utils.js +62 -0
- package/lib/components/schedules/index.d.ts +1 -1
- package/lib/components/schedules/model.d.ts +2 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lib/utils/index.d.ts +6 -5
- package/lib/utils/index.js +12 -1
- package/lowcode/toc-pay/meta.ts +59 -0
- package/package.json +4 -3
|
@@ -0,0 +1,647 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
3
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
9
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
10
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
11
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
12
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
13
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
14
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
15
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
|
+
import React, { useState, useMemo, useContext, useRef, useImperativeHandle, forwardRef } from 'react';
|
|
17
|
+
import { Decimal } from 'decimal.js';
|
|
18
|
+
import { useMemoizedFn, useUpdateEffect } from 'ahooks';
|
|
19
|
+
import { PisellModal, PisellText, PisellContainer, PisellLoading } from '@pisell/materials';
|
|
20
|
+
import { locales } from '@pisell/utils';
|
|
21
|
+
import PayCountdown from "./PayCountdown";
|
|
22
|
+
import PayAmount from "./PayAmount";
|
|
23
|
+
import WalletPassBlock from "./WalletPassBlock";
|
|
24
|
+
import PaymentList from "./PaymentList";
|
|
25
|
+
import PaymentMethods from "./PaymentMethods";
|
|
26
|
+
import { getPaymentsAndWalletPass, getPaymentInit } from "./serve";
|
|
27
|
+
import { Provider, Context } from "./model";
|
|
28
|
+
import useEngineContext from "../../../hooks/useEngineContext";
|
|
29
|
+
import { request } from "../../../utils";
|
|
30
|
+
import { removePayGroupFromStorage } from "./payGroup";
|
|
31
|
+
import localeTexts from "./locales";
|
|
32
|
+
import "./index.less";
|
|
33
|
+
/**
|
|
34
|
+
* @title: C端支付
|
|
35
|
+
* @description:
|
|
36
|
+
* @param {ToCPayProps} props
|
|
37
|
+
* @param {any} ref
|
|
38
|
+
* @return {*}
|
|
39
|
+
* @Author: zhiwei.Wang
|
|
40
|
+
* @Date: 2024-08-16 10:43
|
|
41
|
+
*/
|
|
42
|
+
var ToCPay = function ToCPay(props, ref) {
|
|
43
|
+
var _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _context$appHelper$ut4, _context$appHelper$ut5, _context$appHelper$ut6, _context$appHelper$ut7, _context$appHelper$ut8, _context$appHelper$ut9, _dvaStore$core, _state$payGroup6, _state$payGroup16, _state$order, _state$order2, _state$payGroup21, _state$payGroup22, _state$payGroup23;
|
|
44
|
+
//@ts-ignore
|
|
45
|
+
var _useContext = useContext(Context),
|
|
46
|
+
state = _useContext.state,
|
|
47
|
+
dispatch = _useContext.dispatch;
|
|
48
|
+
// 支付列表Ref
|
|
49
|
+
var paymentListRef = useRef();
|
|
50
|
+
// 支付方式Ref
|
|
51
|
+
var paymentMethodsRef = useRef();
|
|
52
|
+
// loading状态
|
|
53
|
+
var _useState = useState(true),
|
|
54
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
55
|
+
loading = _useState2[0],
|
|
56
|
+
setLoading = _useState2[1];
|
|
57
|
+
// 提交loading状态
|
|
58
|
+
var _useState3 = useState(false),
|
|
59
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
60
|
+
submitLoading = _useState4[0],
|
|
61
|
+
setSubmitLoading = _useState4[1];
|
|
62
|
+
// 是否打开弹窗
|
|
63
|
+
var _useState5 = useState(false),
|
|
64
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
65
|
+
open = _useState6[0],
|
|
66
|
+
setOpen = _useState6[1];
|
|
67
|
+
// 渲染类型
|
|
68
|
+
var _useState7 = useState('modal'),
|
|
69
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
70
|
+
renderType = _useState8[0],
|
|
71
|
+
setRenderType = _useState8[1];
|
|
72
|
+
var context = useEngineContext();
|
|
73
|
+
|
|
74
|
+
// 退出提醒
|
|
75
|
+
var _useState9 = useState(false),
|
|
76
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
77
|
+
showInformation = _useState10[0],
|
|
78
|
+
setShowInformation = _useState10[1];
|
|
79
|
+
// lowCode utils
|
|
80
|
+
var utils = context.appHelper.utils || {};
|
|
81
|
+
// stope
|
|
82
|
+
var dvaStore = (_context$appHelper$ut = context.appHelper.utils) === null || _context$appHelper$ut === void 0 ? void 0 : (_context$appHelper$ut2 = _context$appHelper$ut.getStore) === null || _context$appHelper$ut2 === void 0 ? void 0 : (_context$appHelper$ut3 = _context$appHelper$ut2.call(_context$appHelper$ut)) === null || _context$appHelper$ut3 === void 0 ? void 0 : _context$appHelper$ut3.getState();
|
|
83
|
+
// 客户id
|
|
84
|
+
var customer_id = (_context$appHelper$ut4 = context.appHelper.utils) === null || _context$appHelper$ut4 === void 0 ? void 0 : (_context$appHelper$ut5 = _context$appHelper$ut4.getStore()) === null || _context$appHelper$ut5 === void 0 ? void 0 : (_context$appHelper$ut6 = _context$appHelper$ut5.getState) === null || _context$appHelper$ut6 === void 0 ? void 0 : (_context$appHelper$ut7 = _context$appHelper$ut6.call(_context$appHelper$ut5)) === null || _context$appHelper$ut7 === void 0 ? void 0 : (_context$appHelper$ut8 = _context$appHelper$ut7.global) === null || _context$appHelper$ut8 === void 0 ? void 0 : (_context$appHelper$ut9 = _context$appHelper$ut8.userInfo) === null || _context$appHelper$ut9 === void 0 ? void 0 : _context$appHelper$ut9.id;
|
|
85
|
+
|
|
86
|
+
// 注册多语言
|
|
87
|
+
locales.init(localeTexts, ((_dvaStore$core = dvaStore.core) === null || _dvaStore$core === void 0 ? void 0 : _dvaStore$core.translateLocale) || 'en');
|
|
88
|
+
|
|
89
|
+
// 注册请求
|
|
90
|
+
request.setRequest(utils === null || utils === void 0 ? void 0 : utils.request);
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* @title: 初始化store
|
|
94
|
+
* @description:
|
|
95
|
+
* @return {*}
|
|
96
|
+
* @Author: zhiwei.Wang
|
|
97
|
+
* @Date: 2024-08-15 14:02
|
|
98
|
+
*/
|
|
99
|
+
var _initStore = function _initStore(initProps) {
|
|
100
|
+
var _context$appHelper$ut10, _initProps$order, _initProps$order2, _initProps$order3;
|
|
101
|
+
dispatch({
|
|
102
|
+
type: 'init',
|
|
103
|
+
payload: _objectSpread(_objectSpread({}, initProps), {}, {
|
|
104
|
+
status: 'init',
|
|
105
|
+
// 将支付回调储存在store, 方便其他模块调用
|
|
106
|
+
payCallback: props.callback,
|
|
107
|
+
history: (_context$appHelper$ut10 = context.appHelper.utils) === null || _context$appHelper$ut10 === void 0 ? void 0 : _context$appHelper$ut10.history,
|
|
108
|
+
// 支付组
|
|
109
|
+
payGroup: {
|
|
110
|
+
order_id: initProps === null || initProps === void 0 ? void 0 : (_initProps$order = initProps.order) === null || _initProps$order === void 0 ? void 0 : _initProps$order.order_id,
|
|
111
|
+
total_amount: initProps === null || initProps === void 0 ? void 0 : (_initProps$order2 = initProps.order) === null || _initProps$order2 === void 0 ? void 0 : _initProps$order2.amount,
|
|
112
|
+
// 原订单信息
|
|
113
|
+
_order: initProps === null || initProps === void 0 ? void 0 : initProps.order,
|
|
114
|
+
payment_group_id: initProps === null || initProps === void 0 ? void 0 : (_initProps$order3 = initProps.order) === null || _initProps$order3 === void 0 ? void 0 : _initProps$order3.payment_group_id
|
|
115
|
+
}
|
|
116
|
+
})
|
|
117
|
+
});
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* @title: 全局唯一初始化方法
|
|
122
|
+
* @description:
|
|
123
|
+
* @param {InitProps} initProps
|
|
124
|
+
* @return {*}
|
|
125
|
+
* @Author: zhiwei.Wang
|
|
126
|
+
* @Date: 2024-08-15 14:02
|
|
127
|
+
*/
|
|
128
|
+
var init = /*#__PURE__*/function () {
|
|
129
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(initProps) {
|
|
130
|
+
var renderType;
|
|
131
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
132
|
+
while (1) switch (_context.prev = _context.next) {
|
|
133
|
+
case 0:
|
|
134
|
+
renderType = initProps.renderType;
|
|
135
|
+
setRenderType(renderType !== null && renderType !== void 0 ? renderType : 'modal');
|
|
136
|
+
// 打开弹窗
|
|
137
|
+
setOpen(true);
|
|
138
|
+
|
|
139
|
+
// 关闭选择支付方式的loading
|
|
140
|
+
setSubmitLoading(false);
|
|
141
|
+
|
|
142
|
+
// 打开加载的loading
|
|
143
|
+
setLoading(true);
|
|
144
|
+
|
|
145
|
+
// 1. 初始化store
|
|
146
|
+
_initStore(initProps);
|
|
147
|
+
|
|
148
|
+
// 删除重复的交易组
|
|
149
|
+
removePayGroupFromStorage(initProps.order.order_id);
|
|
150
|
+
|
|
151
|
+
// 获取支付列表和钱包
|
|
152
|
+
_context.next = 9;
|
|
153
|
+
return _getPaymentsAndWalletPass(initProps.order);
|
|
154
|
+
case 9:
|
|
155
|
+
case "end":
|
|
156
|
+
return _context.stop();
|
|
157
|
+
}
|
|
158
|
+
}, _callee);
|
|
159
|
+
}));
|
|
160
|
+
return function init(_x2) {
|
|
161
|
+
return _ref.apply(this, arguments);
|
|
162
|
+
};
|
|
163
|
+
}();
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* @title: 获取支付列表和钱包
|
|
167
|
+
* @description:
|
|
168
|
+
* @param {any} order
|
|
169
|
+
* @return {*}
|
|
170
|
+
* @Author: zhiwei.Wang
|
|
171
|
+
* @Date: 2024-08-15 13:51
|
|
172
|
+
*/
|
|
173
|
+
var _getPaymentsAndWalletPass = /*#__PURE__*/function () {
|
|
174
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(order) {
|
|
175
|
+
var _state$payGroup, _paymentListRef$curre, data, _ref3, _ref3$remain_amount, remain_amount, wallet_pass_recommend_list, wallet_pass_amount, payment_list, walletPass;
|
|
176
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
177
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
178
|
+
case 0:
|
|
179
|
+
_context2.prev = 0;
|
|
180
|
+
_context2.next = 3;
|
|
181
|
+
return getPaymentsAndWalletPass({
|
|
182
|
+
order_id: order.order_id,
|
|
183
|
+
total_amount: order.amount,
|
|
184
|
+
sale_channel: order.sale_channel || 'online-store'
|
|
185
|
+
});
|
|
186
|
+
case 3:
|
|
187
|
+
data = _context2.sent;
|
|
188
|
+
_ref3 = data || {}, _ref3$remain_amount = _ref3.remain_amount, remain_amount = _ref3$remain_amount === void 0 ? 0 : _ref3$remain_amount, wallet_pass_recommend_list = _ref3.wallet_pass_recommend_list, wallet_pass_amount = _ref3.wallet_pass_amount, payment_list = _ref3.payment_list, walletPass = _ref3.walletPass; // 设置交易组
|
|
189
|
+
dispatch({
|
|
190
|
+
type: 'setPayGroup',
|
|
191
|
+
payload: _objectSpread(_objectSpread({}, state.payGroup), {}, {
|
|
192
|
+
// 支付方式没有walletPass时walletPass设置null
|
|
193
|
+
walletPass: walletPass ? _objectSpread(_objectSpread(_objectSpread({}, (_state$payGroup = state.payGroup) === null || _state$payGroup === void 0 ? void 0 : _state$payGroup.walletPass), walletPass), {}, {
|
|
194
|
+
amount: wallet_pass_amount,
|
|
195
|
+
cards: wallet_pass_recommend_list
|
|
196
|
+
}) : null,
|
|
197
|
+
total_amount: order.amount,
|
|
198
|
+
wait_amount: remain_amount
|
|
199
|
+
})
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
// 初始化支付列表
|
|
203
|
+
_context2.next = 8;
|
|
204
|
+
return (_paymentListRef$curre = paymentListRef.current) === null || _paymentListRef$curre === void 0 ? void 0 : _paymentListRef$curre.init(payment_list);
|
|
205
|
+
case 8:
|
|
206
|
+
// 解除loading
|
|
207
|
+
setTimeout(function () {
|
|
208
|
+
setLoading(false);
|
|
209
|
+
}, 100);
|
|
210
|
+
_context2.next = 15;
|
|
211
|
+
break;
|
|
212
|
+
case 11:
|
|
213
|
+
_context2.prev = 11;
|
|
214
|
+
_context2.t0 = _context2["catch"](0);
|
|
215
|
+
console.log('err', _context2.t0);
|
|
216
|
+
payCallback({
|
|
217
|
+
key: 'fail',
|
|
218
|
+
data: {}
|
|
219
|
+
});
|
|
220
|
+
case 15:
|
|
221
|
+
case "end":
|
|
222
|
+
return _context2.stop();
|
|
223
|
+
}
|
|
224
|
+
}, _callee2, null, [[0, 11]]);
|
|
225
|
+
}));
|
|
226
|
+
return function _getPaymentsAndWalletPass(_x3) {
|
|
227
|
+
return _ref2.apply(this, arguments);
|
|
228
|
+
};
|
|
229
|
+
}();
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* @title: 选择支付方式
|
|
233
|
+
* @description:
|
|
234
|
+
* @param {string} type
|
|
235
|
+
* @param {PayGroup} payGroup
|
|
236
|
+
* @return {*}
|
|
237
|
+
* @Author: zhiwei.Wang
|
|
238
|
+
* @Date: 2024-08-16 10:46
|
|
239
|
+
*/
|
|
240
|
+
var handlePaymentByType = /*#__PURE__*/function () {
|
|
241
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(type, payGroup) {
|
|
242
|
+
var _paymentMethodsRef$cu, _state$payGroup2, _state$payGroup2$othe;
|
|
243
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
244
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
245
|
+
case 0:
|
|
246
|
+
// 打开loading
|
|
247
|
+
setSubmitLoading(true);
|
|
248
|
+
|
|
249
|
+
// 根据不同的支付方式, 调用不同的支付方法
|
|
250
|
+
_context3.next = 3;
|
|
251
|
+
return (_paymentMethodsRef$cu = paymentMethodsRef.current) === null || _paymentMethodsRef$cu === void 0 ? void 0 : _paymentMethodsRef$cu.onPay({
|
|
252
|
+
type: type || ((_state$payGroup2 = state.payGroup) === null || _state$payGroup2 === void 0 ? void 0 : (_state$payGroup2$othe = _state$payGroup2.otherPayment) === null || _state$payGroup2$othe === void 0 ? void 0 : _state$payGroup2$othe.service),
|
|
253
|
+
payGroup: payGroup || state.payGroup
|
|
254
|
+
});
|
|
255
|
+
case 3:
|
|
256
|
+
// 关闭loading
|
|
257
|
+
setSubmitLoading(false);
|
|
258
|
+
case 4:
|
|
259
|
+
case "end":
|
|
260
|
+
return _context3.stop();
|
|
261
|
+
}
|
|
262
|
+
}, _callee3);
|
|
263
|
+
}));
|
|
264
|
+
return function handlePaymentByType(_x4, _x5) {
|
|
265
|
+
return _ref4.apply(this, arguments);
|
|
266
|
+
};
|
|
267
|
+
}();
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* @title: 创建交易组
|
|
271
|
+
* @description:
|
|
272
|
+
* @return {*}
|
|
273
|
+
* @Author: zhiwei.Wang
|
|
274
|
+
* @Date: 2024-08-15 13:41
|
|
275
|
+
*/
|
|
276
|
+
var paymentInit = /*#__PURE__*/function () {
|
|
277
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(newOrderId) {
|
|
278
|
+
var _state$payGroup3;
|
|
279
|
+
var orderId, _state$payGroup4, data;
|
|
280
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
281
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
282
|
+
case 0:
|
|
283
|
+
// 默认使用store内的order_id, 如果传入了新的order_id, 则使用新的order_id
|
|
284
|
+
orderId = newOrderId || ((_state$payGroup3 = state.payGroup) === null || _state$payGroup3 === void 0 ? void 0 : _state$payGroup3.order_id);
|
|
285
|
+
setSubmitLoading(true);
|
|
286
|
+
_context4.prev = 2;
|
|
287
|
+
_context4.next = 5;
|
|
288
|
+
return getPaymentInit({
|
|
289
|
+
order_id: orderId,
|
|
290
|
+
amount: (_state$payGroup4 = state.payGroup) === null || _state$payGroup4 === void 0 ? void 0 : _state$payGroup4.total_amount
|
|
291
|
+
});
|
|
292
|
+
case 5:
|
|
293
|
+
data = _context4.sent;
|
|
294
|
+
// 设置交易组
|
|
295
|
+
dispatch({
|
|
296
|
+
type: 'setPayGroup',
|
|
297
|
+
payload: {
|
|
298
|
+
order_id: orderId,
|
|
299
|
+
total_amount: data.amount,
|
|
300
|
+
payment_group_id: data.payment_group_id,
|
|
301
|
+
payment_priority: data.payment_priority
|
|
302
|
+
}
|
|
303
|
+
});
|
|
304
|
+
return _context4.abrupt("return", _objectSpread(_objectSpread({}, state.payGroup), {}, {
|
|
305
|
+
order_id: orderId,
|
|
306
|
+
total_amount: data.amount,
|
|
307
|
+
payment_group_id: data.payment_group_id,
|
|
308
|
+
payment_priority: data.payment_priority
|
|
309
|
+
}));
|
|
310
|
+
case 10:
|
|
311
|
+
_context4.prev = 10;
|
|
312
|
+
_context4.t0 = _context4["catch"](2);
|
|
313
|
+
setSubmitLoading(false);
|
|
314
|
+
payCallback({
|
|
315
|
+
key: 'fail',
|
|
316
|
+
data: {}
|
|
317
|
+
});
|
|
318
|
+
case 14:
|
|
319
|
+
case "end":
|
|
320
|
+
return _context4.stop();
|
|
321
|
+
}
|
|
322
|
+
}, _callee4, null, [[2, 10]]);
|
|
323
|
+
}));
|
|
324
|
+
return function paymentInit(_x6) {
|
|
325
|
+
return _ref5.apply(this, arguments);
|
|
326
|
+
};
|
|
327
|
+
}();
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* @title: 除去钱包后的待支付金额
|
|
331
|
+
* @description:
|
|
332
|
+
* @param {*} useMemo
|
|
333
|
+
* @return {*}
|
|
334
|
+
* @Author: zhiwei.Wang
|
|
335
|
+
* @Date: 2024-08-15 13:47
|
|
336
|
+
*/
|
|
337
|
+
var waitAmount = useMemo(function () {
|
|
338
|
+
var _state$payGroup5;
|
|
339
|
+
return ((_state$payGroup5 = state.payGroup) === null || _state$payGroup5 === void 0 ? void 0 : _state$payGroup5.wait_amount) || 0;
|
|
340
|
+
}, [(_state$payGroup6 = state.payGroup) === null || _state$payGroup6 === void 0 ? void 0 : _state$payGroup6.wait_amount]);
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* @title: 是否仅钱包支付
|
|
344
|
+
* @description:
|
|
345
|
+
* @param {*} useMemo
|
|
346
|
+
* @return {*}
|
|
347
|
+
* @Author: zhiwei.Wang
|
|
348
|
+
* @Date: 2024-08-15 13:46
|
|
349
|
+
*/
|
|
350
|
+
var isWalletPassPay = useMemo(function () {
|
|
351
|
+
var _state$payGroup7, _state$payGroup7$wall, _state$payGroup7$wall2;
|
|
352
|
+
var isWalletPass = (_state$payGroup7 = state.payGroup) === null || _state$payGroup7 === void 0 ? void 0 : (_state$payGroup7$wall = _state$payGroup7.walletPass) === null || _state$payGroup7$wall === void 0 ? void 0 : (_state$payGroup7$wall2 = _state$payGroup7$wall.cards) === null || _state$payGroup7$wall2 === void 0 ? void 0 : _state$payGroup7$wall2.length;
|
|
353
|
+
// 待支付金额小于0 并且已经选择了卡
|
|
354
|
+
return waitAmount <= 0 && isWalletPass;
|
|
355
|
+
}, [state.payGroup, waitAmount]);
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* @title: 是否禁止提交
|
|
359
|
+
* @description:
|
|
360
|
+
* @param {*} useMemo
|
|
361
|
+
* @return {*}
|
|
362
|
+
* @Author: zhiwei.Wang
|
|
363
|
+
* @Date: 2024-08-15 13:40
|
|
364
|
+
*/
|
|
365
|
+
var isDisabled = useMemo(function () {
|
|
366
|
+
// 当待支付金额 大于 0 则必须选择其他支付方式, 否则禁止
|
|
367
|
+
if (waitAmount > 0) {
|
|
368
|
+
var _state$payGroup8, _state$payGroup8$othe;
|
|
369
|
+
var isOtherPayment = (_state$payGroup8 = state.payGroup) === null || _state$payGroup8 === void 0 ? void 0 : (_state$payGroup8$othe = _state$payGroup8.otherPayment) === null || _state$payGroup8$othe === void 0 ? void 0 : _state$payGroup8$othe.service;
|
|
370
|
+
return !isOtherPayment;
|
|
371
|
+
} else {
|
|
372
|
+
return !isWalletPassPay;
|
|
373
|
+
}
|
|
374
|
+
}, [state.payGroup, waitAmount, isWalletPassPay]);
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* @title: 提交
|
|
378
|
+
* @description:
|
|
379
|
+
* @return {*}
|
|
380
|
+
* @Author: zhiwei.Wang
|
|
381
|
+
* @Date: 2024-08-15 13:25
|
|
382
|
+
*/
|
|
383
|
+
var onSubmit = /*#__PURE__*/function () {
|
|
384
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(newOrderId) {
|
|
385
|
+
var _state$payGroup9;
|
|
386
|
+
var newPayGroup;
|
|
387
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
388
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
389
|
+
case 0:
|
|
390
|
+
newPayGroup = state.payGroup; // 如果未创建交易组, 则先创建交易组
|
|
391
|
+
if ((_state$payGroup9 = state.payGroup) !== null && _state$payGroup9 !== void 0 && _state$payGroup9.payment_group_id) {
|
|
392
|
+
_context5.next = 5;
|
|
393
|
+
break;
|
|
394
|
+
}
|
|
395
|
+
_context5.next = 4;
|
|
396
|
+
return paymentInit(newOrderId);
|
|
397
|
+
case 4:
|
|
398
|
+
newPayGroup = _context5.sent;
|
|
399
|
+
case 5:
|
|
400
|
+
// 调用支付
|
|
401
|
+
handlePaymentByType(undefined, newPayGroup);
|
|
402
|
+
case 6:
|
|
403
|
+
case "end":
|
|
404
|
+
return _context5.stop();
|
|
405
|
+
}
|
|
406
|
+
}, _callee5);
|
|
407
|
+
}));
|
|
408
|
+
return function onSubmit(_x7) {
|
|
409
|
+
return _ref6.apply(this, arguments);
|
|
410
|
+
};
|
|
411
|
+
}();
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* @title: 支付方式改变时
|
|
415
|
+
* @description:
|
|
416
|
+
* @param {any} payload
|
|
417
|
+
* @return {*}
|
|
418
|
+
* @Author: zhiwei.Wang
|
|
419
|
+
* @Date: 2024-08-15 13:51
|
|
420
|
+
*/
|
|
421
|
+
var paymentTypeChange = function paymentTypeChange(payload) {
|
|
422
|
+
dispatch({
|
|
423
|
+
type: 'setPayGroup',
|
|
424
|
+
payload: {
|
|
425
|
+
otherPayment: payload
|
|
426
|
+
}
|
|
427
|
+
});
|
|
428
|
+
};
|
|
429
|
+
|
|
430
|
+
// 确认按钮
|
|
431
|
+
var okText = useMemo(function () {
|
|
432
|
+
var _state$payGroup10, _state$payGroup11;
|
|
433
|
+
var current = (_state$payGroup10 = state.payGroup) === null || _state$payGroup10 === void 0 ? void 0 : _state$payGroup10.otherPayment;
|
|
434
|
+
|
|
435
|
+
// 没有其他支付金额, 则直接使用钱包支付 展示submit
|
|
436
|
+
if (((_state$payGroup11 = state.payGroup) === null || _state$payGroup11 === void 0 ? void 0 : _state$payGroup11.wait_amount) == 0) {
|
|
437
|
+
return locales.getText('tocPay.text.submit');
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
// 有手续费的话展示手续费
|
|
441
|
+
if (current !== null && current !== void 0 && current.surcharge) {
|
|
442
|
+
var _state$payGroup12;
|
|
443
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
444
|
+
className: ""
|
|
445
|
+
}, locales.getText('tocPay.text.pay'), ' ', /*#__PURE__*/React.createElement(PisellText.Amount, {
|
|
446
|
+
value: ((_state$payGroup12 = state.payGroup) === null || _state$payGroup12 === void 0 ? void 0 : _state$payGroup12.wait_amount) || 0.0
|
|
447
|
+
}), " +", locales.getText('tocPay.text.surcharge'));
|
|
448
|
+
} else {
|
|
449
|
+
var _state$payGroup13;
|
|
450
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
451
|
+
className: ""
|
|
452
|
+
}, locales.getText('tocPay.text.pay'), ' ', /*#__PURE__*/React.createElement(PisellText.Amount, {
|
|
453
|
+
value: ((_state$payGroup13 = state.payGroup) === null || _state$payGroup13 === void 0 ? void 0 : _state$payGroup13.wait_amount) || 0.0
|
|
454
|
+
}));
|
|
455
|
+
}
|
|
456
|
+
}, [state.payGroup]);
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* @title: 支付结果回调
|
|
460
|
+
* @description:
|
|
461
|
+
* @return {*}
|
|
462
|
+
* @Author: zhiwei.Wang
|
|
463
|
+
* @Date: 2024-08-09 14:25
|
|
464
|
+
*/
|
|
465
|
+
var payCallback = /*#__PURE__*/function () {
|
|
466
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(res) {
|
|
467
|
+
var _props$callback;
|
|
468
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
469
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
470
|
+
case 0:
|
|
471
|
+
// 取消支付,关闭弹窗
|
|
472
|
+
if (res.key === 'cancel') {
|
|
473
|
+
setOpen(false);
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
// 回调外部
|
|
477
|
+
(_props$callback = props.callback) === null || _props$callback === void 0 ? void 0 : _props$callback.call(props, res);
|
|
478
|
+
case 2:
|
|
479
|
+
case "end":
|
|
480
|
+
return _context6.stop();
|
|
481
|
+
}
|
|
482
|
+
}, _callee6);
|
|
483
|
+
}));
|
|
484
|
+
return function payCallback(_x8) {
|
|
485
|
+
return _ref7.apply(this, arguments);
|
|
486
|
+
};
|
|
487
|
+
}();
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* @title: 取消支付
|
|
491
|
+
* @description:
|
|
492
|
+
* @return {*}
|
|
493
|
+
* @Author: zhiwei.Wang
|
|
494
|
+
* @Date: 2024-08-08 16:34
|
|
495
|
+
*/
|
|
496
|
+
var onCancel = function onCancel() {
|
|
497
|
+
var _state$payGroup14;
|
|
498
|
+
// 删除交易组
|
|
499
|
+
removePayGroupFromStorage((_state$payGroup14 = state.payGroup) === null || _state$payGroup14 === void 0 ? void 0 : _state$payGroup14.order_id);
|
|
500
|
+
|
|
501
|
+
// 关闭二次提示弹窗
|
|
502
|
+
setShowInformation(false);
|
|
503
|
+
|
|
504
|
+
// 关闭支付弹窗
|
|
505
|
+
setOpen(false);
|
|
506
|
+
|
|
507
|
+
// 回调外部
|
|
508
|
+
payCallback({
|
|
509
|
+
key: 'cancel',
|
|
510
|
+
data: {}
|
|
511
|
+
});
|
|
512
|
+
};
|
|
513
|
+
|
|
514
|
+
// 待支付金额变化时, 重新计算附加费
|
|
515
|
+
useUpdateEffect(function () {
|
|
516
|
+
var _paymentListRef$curre2, _state$payGroup15;
|
|
517
|
+
(_paymentListRef$curre2 = paymentListRef.current) === null || _paymentListRef$curre2 === void 0 ? void 0 : _paymentListRef$curre2.calculateSurcharge(((_state$payGroup15 = state.payGroup) === null || _state$payGroup15 === void 0 ? void 0 : _state$payGroup15.wait_amount) || 0);
|
|
518
|
+
}, [(_state$payGroup16 = state.payGroup) === null || _state$payGroup16 === void 0 ? void 0 : _state$payGroup16.wait_amount]);
|
|
519
|
+
useImperativeHandle(ref, function () {
|
|
520
|
+
return {
|
|
521
|
+
init: init,
|
|
522
|
+
payCallback: payCallback,
|
|
523
|
+
onSubmit: onSubmit
|
|
524
|
+
};
|
|
525
|
+
});
|
|
526
|
+
|
|
527
|
+
/**
|
|
528
|
+
* @title: 自定义渲染支付列表的标题
|
|
529
|
+
* @description:
|
|
530
|
+
* @return {*}
|
|
531
|
+
* @Author: zhiwei.Wang
|
|
532
|
+
* @Date: 2024-08-16 10:49
|
|
533
|
+
*/
|
|
534
|
+
var renderPaymentListTitle = function renderPaymentListTitle() {
|
|
535
|
+
var _state$payGroup17;
|
|
536
|
+
// 待支付金额为0 展示无需选择支付方式
|
|
537
|
+
if (waitAmount == 0) {
|
|
538
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
539
|
+
className: "custom-payment-list-title"
|
|
540
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
541
|
+
className: ""
|
|
542
|
+
}, locales.getText('tocPay.text.clickSubmitToComplete')), /*#__PURE__*/React.createElement("div", {
|
|
543
|
+
className: "custom-payment-list-title-desc"
|
|
544
|
+
}, locales.getText('tocPay.text.noExtraPayNeeded')));
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
// 有剩余金额, 展示继续支付
|
|
548
|
+
if (((_state$payGroup17 = state.payGroup) === null || _state$payGroup17 === void 0 ? void 0 : _state$payGroup17.total_amount) !== waitAmount) {
|
|
549
|
+
var _state$payGroup18;
|
|
550
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
551
|
+
className: "custom-payment-list-title"
|
|
552
|
+
}, locales.getText('tocPay.text.continuePayment'), ' ', /*#__PURE__*/React.createElement(PisellText.Amount, {
|
|
553
|
+
className: "custom-payment-list-title-price",
|
|
554
|
+
value: ((_state$payGroup18 = state.payGroup) === null || _state$payGroup18 === void 0 ? void 0 : _state$payGroup18.wait_amount) || 0.0
|
|
555
|
+
}));
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
// 无钱包, 展示支付方式
|
|
559
|
+
return locales.getText('tocPay.text.paymentMethod');
|
|
560
|
+
};
|
|
561
|
+
|
|
562
|
+
/**
|
|
563
|
+
* @title: 钱包变化
|
|
564
|
+
* @description:
|
|
565
|
+
* @return {*}
|
|
566
|
+
* @Author: zhiwei.Wang
|
|
567
|
+
* @Date: 2024-08-16 10:50
|
|
568
|
+
*/
|
|
569
|
+
var onWalletPassChange = useMemoizedFn(function (walletPass) {
|
|
570
|
+
var _state$payGroup19, _state$payGroup20;
|
|
571
|
+
var _waitAmount = new Decimal(String(((_state$payGroup19 = state.payGroup) === null || _state$payGroup19 === void 0 ? void 0 : _state$payGroup19.total_amount) || 0)).minus(new Decimal(String(walletPass.amount || 0))).toNumber();
|
|
572
|
+
dispatch({
|
|
573
|
+
type: 'setPayGroup',
|
|
574
|
+
payload: {
|
|
575
|
+
walletPass: _objectSpread(_objectSpread({}, (_state$payGroup20 = state.payGroup) === null || _state$payGroup20 === void 0 ? void 0 : _state$payGroup20.walletPass), walletPass),
|
|
576
|
+
wait_amount: _waitAmount
|
|
577
|
+
}
|
|
578
|
+
});
|
|
579
|
+
});
|
|
580
|
+
return /*#__PURE__*/React.createElement(PisellContainer, {
|
|
581
|
+
renderType: renderType,
|
|
582
|
+
props: {
|
|
583
|
+
forceRender: true,
|
|
584
|
+
title: /*#__PURE__*/React.createElement("div", null, locales.getText('tocPay.text.checkout')),
|
|
585
|
+
open: open,
|
|
586
|
+
cancelVisible: false,
|
|
587
|
+
okText: okText,
|
|
588
|
+
bodyStyle: {
|
|
589
|
+
padding: 24
|
|
590
|
+
},
|
|
591
|
+
onCancel: function onCancel() {
|
|
592
|
+
setShowInformation(true);
|
|
593
|
+
},
|
|
594
|
+
okButtonProps: {
|
|
595
|
+
disabled: isDisabled,
|
|
596
|
+
loading: submitLoading,
|
|
597
|
+
className: 'toc-pay-submit-btn'
|
|
598
|
+
},
|
|
599
|
+
onOk: function onOk() {
|
|
600
|
+
onSubmit();
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
}, /*#__PURE__*/React.createElement(PisellModal.Information, {
|
|
604
|
+
open: showInformation,
|
|
605
|
+
title: locales.getText('tocPay.text.prompt'),
|
|
606
|
+
describe: locales.getText('tocPay.text.confirmLeave'),
|
|
607
|
+
okText: locales.getText('tocPay.text.continuePay'),
|
|
608
|
+
cancelText: locales.getText('tocPay.text.leave'),
|
|
609
|
+
closable: true,
|
|
610
|
+
cancelButtonProps: {
|
|
611
|
+
onClick: function onClick() {
|
|
612
|
+
onCancel();
|
|
613
|
+
}
|
|
614
|
+
},
|
|
615
|
+
maskClosable: false,
|
|
616
|
+
onCancel: function onCancel() {
|
|
617
|
+
setShowInformation(false);
|
|
618
|
+
},
|
|
619
|
+
onOk: function onOk() {
|
|
620
|
+
setShowInformation(false);
|
|
621
|
+
}
|
|
622
|
+
}), /*#__PURE__*/React.createElement(PisellLoading, {
|
|
623
|
+
loading: loading,
|
|
624
|
+
mask: true
|
|
625
|
+
// fullscreen={state.platform === 'h5'}
|
|
626
|
+
}, ((_state$order = state.order) === null || _state$order === void 0 ? void 0 : _state$order.countdown) && /*#__PURE__*/React.createElement(PayCountdown, {
|
|
627
|
+
time: (_state$order2 = state.order) === null || _state$order2 === void 0 ? void 0 : _state$order2.countdown
|
|
628
|
+
}), /*#__PURE__*/React.createElement(PayAmount, {
|
|
629
|
+
amount: ((_state$payGroup21 = state.payGroup) === null || _state$payGroup21 === void 0 ? void 0 : _state$payGroup21.total_amount) || 0
|
|
630
|
+
}), ((_state$payGroup22 = state.payGroup) === null || _state$payGroup22 === void 0 ? void 0 : _state$payGroup22.walletPass) && /*#__PURE__*/React.createElement(WalletPassBlock, {
|
|
631
|
+
customer_id: customer_id,
|
|
632
|
+
payGroup: state.payGroup,
|
|
633
|
+
onWalletPassChange: onWalletPassChange
|
|
634
|
+
}), /*#__PURE__*/React.createElement(PaymentList, {
|
|
635
|
+
ref: paymentListRef,
|
|
636
|
+
handlePayment: function handlePayment() {
|
|
637
|
+
handlePaymentByType();
|
|
638
|
+
},
|
|
639
|
+
paymentTypeChange: paymentTypeChange,
|
|
640
|
+
hide: ((_state$payGroup23 = state.payGroup) === null || _state$payGroup23 === void 0 ? void 0 : _state$payGroup23.wait_amount) == 0,
|
|
641
|
+
renderTitle: renderPaymentListTitle
|
|
642
|
+
})), /*#__PURE__*/React.createElement(PaymentMethods, {
|
|
643
|
+
ref: paymentMethodsRef,
|
|
644
|
+
payCallback: payCallback
|
|
645
|
+
}));
|
|
646
|
+
};
|
|
647
|
+
export default Provider( /*#__PURE__*/forwardRef(ToCPay));
|