@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,105 @@
|
|
|
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 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; }
|
|
3
|
+
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; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
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); }
|
|
7
|
+
var STORAGE_KEY = 'payGroup';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @title: 创建交易组key
|
|
11
|
+
* @description:
|
|
12
|
+
* @param {string} orderId
|
|
13
|
+
* @return {*}
|
|
14
|
+
* @Author: zhiwei.Wang
|
|
15
|
+
* @Date: 2024-08-16 10:40
|
|
16
|
+
*/
|
|
17
|
+
var createPayGroupKey = function createPayGroupKey(orderId) {
|
|
18
|
+
return "".concat(STORAGE_KEY, "_").concat(orderId);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @title: 同步交易组到storage
|
|
23
|
+
* @description:
|
|
24
|
+
* @param {PayGroup} payGroup
|
|
25
|
+
* @return {*}
|
|
26
|
+
* @Author: zhiwei.Wang
|
|
27
|
+
* @Date: 2024-08-16 10:40
|
|
28
|
+
*/
|
|
29
|
+
export var syncPayGroupToStorage = function syncPayGroupToStorage(payGroup) {
|
|
30
|
+
localStorage.setItem(createPayGroupKey(payGroup.order_id), JSON.stringify(payGroup));
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @title: 通过订单id获取交易组
|
|
35
|
+
* @description:
|
|
36
|
+
* @param {string} orderId
|
|
37
|
+
* @return {*}
|
|
38
|
+
* @Author: zhiwei.Wang
|
|
39
|
+
* @Date: 2024-08-16 10:40
|
|
40
|
+
*/
|
|
41
|
+
export var getPayGroupFromStorage = function getPayGroupFromStorage(orderId) {
|
|
42
|
+
var key = createPayGroupKey(orderId);
|
|
43
|
+
var payGroupStr = localStorage.getItem(key);
|
|
44
|
+
if (payGroupStr) {
|
|
45
|
+
return JSON.parse(payGroupStr);
|
|
46
|
+
}
|
|
47
|
+
return null;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @title: 删除交易组
|
|
52
|
+
* @description:
|
|
53
|
+
* @param {string} orderId
|
|
54
|
+
* @return {*}
|
|
55
|
+
* @Author: zhiwei.Wang
|
|
56
|
+
* @Date: 2024-08-16 10:40
|
|
57
|
+
*/
|
|
58
|
+
export var removePayGroupFromStorage = function removePayGroupFromStorage(orderId) {
|
|
59
|
+
var key = createPayGroupKey(orderId);
|
|
60
|
+
localStorage.removeItem(key);
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @title: 获取交易组参数
|
|
65
|
+
* @description:
|
|
66
|
+
* @param {string} orderId
|
|
67
|
+
* @param {any} rest
|
|
68
|
+
* @return {*}
|
|
69
|
+
* @Author: zhiwei.Wang
|
|
70
|
+
* @Date: 2024-08-16 10:40
|
|
71
|
+
*/
|
|
72
|
+
export var getPayGroupParamsFromStorage = function getPayGroupParamsFromStorage(orderId, rest) {
|
|
73
|
+
try {
|
|
74
|
+
// 获取交易组信息
|
|
75
|
+
var payGroup = getPayGroupFromStorage(orderId);
|
|
76
|
+
if (!payGroup) {
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// 合并传进来的参数
|
|
81
|
+
return _objectSpread(_objectSpread({}, rest), {}, {
|
|
82
|
+
amount: payGroup === null || payGroup === void 0 ? void 0 : payGroup.wait_amount,
|
|
83
|
+
payment_group_id: payGroup === null || payGroup === void 0 ? void 0 : payGroup.payment_group_id
|
|
84
|
+
});
|
|
85
|
+
} catch (err) {}
|
|
86
|
+
return null;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* @title: 通过订单id设置交易号
|
|
91
|
+
* @description:
|
|
92
|
+
* @param {string} orderId
|
|
93
|
+
* @param {string} payNumber
|
|
94
|
+
* @return {*}
|
|
95
|
+
* @Author: zhiwei.Wang
|
|
96
|
+
* @Date: 2024-08-16 10:41
|
|
97
|
+
*/
|
|
98
|
+
export var setPayNumber = function setPayNumber(orderId, payNumber) {
|
|
99
|
+
// 查找交易组
|
|
100
|
+
var payGroup = getPayGroupFromStorage(orderId);
|
|
101
|
+
if (payGroup) {
|
|
102
|
+
payGroup.pay_number = payNumber;
|
|
103
|
+
syncPayGroupToStorage(payGroup);
|
|
104
|
+
}
|
|
105
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export declare const getPaymentList: (values: any) => Promise<{
|
|
2
|
+
message: string;
|
|
3
|
+
status: string;
|
|
4
|
+
paymentList?: undefined;
|
|
5
|
+
} | {
|
|
6
|
+
message: string;
|
|
7
|
+
status: string;
|
|
8
|
+
paymentList: any;
|
|
9
|
+
}>;
|
|
10
|
+
/**
|
|
11
|
+
* @title: 聚合接口, 根据订单 返回支付列表和钱包
|
|
12
|
+
* @description:
|
|
13
|
+
* @param {object} values
|
|
14
|
+
* @return {*}
|
|
15
|
+
* @Author: zhiwei.Wang
|
|
16
|
+
* @Date: 2024-08-15 11:52
|
|
17
|
+
*/
|
|
18
|
+
export declare const getPaymentsAndWalletPass: (values: {
|
|
19
|
+
order_id: string;
|
|
20
|
+
total_amount: number;
|
|
21
|
+
sale_channel: string;
|
|
22
|
+
}) => Promise<any>;
|
|
23
|
+
/**
|
|
24
|
+
* @title: 初始化交易组
|
|
25
|
+
* @description:
|
|
26
|
+
* @param {object} values
|
|
27
|
+
* @return {*}
|
|
28
|
+
* @Author: zhiwei.Wang
|
|
29
|
+
* @Date: 2024-08-16 10:42
|
|
30
|
+
*/
|
|
31
|
+
export declare const getPaymentInit: (values: {
|
|
32
|
+
order_id?: string;
|
|
33
|
+
amount?: number;
|
|
34
|
+
}) => Promise<any>;
|
|
@@ -0,0 +1,148 @@
|
|
|
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 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; }
|
|
3
|
+
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; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
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); }
|
|
7
|
+
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; }
|
|
8
|
+
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); } }
|
|
9
|
+
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); }); }; }
|
|
10
|
+
import { request } from "../../../utils";
|
|
11
|
+
import { paymentKeys } from "./status";
|
|
12
|
+
import { isWx, isSafari } from '@pisell/utils';
|
|
13
|
+
|
|
14
|
+
// 获取支付列表
|
|
15
|
+
export var getPaymentList = /*#__PURE__*/function () {
|
|
16
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(values) {
|
|
17
|
+
var paymentList, _yield$request$getReq, data, arr;
|
|
18
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
19
|
+
while (1) switch (_context.prev = _context.next) {
|
|
20
|
+
case 0:
|
|
21
|
+
paymentList = [];
|
|
22
|
+
_context.next = 3;
|
|
23
|
+
return request.getRequest().get('/h5/pay/order/payments', values);
|
|
24
|
+
case 3:
|
|
25
|
+
_yield$request$getReq = _context.sent;
|
|
26
|
+
data = _yield$request$getReq.data;
|
|
27
|
+
// 过滤出支持的支付方式
|
|
28
|
+
paymentList = (data || []).filter(function (d) {
|
|
29
|
+
return paymentKeys.includes(d.service);
|
|
30
|
+
});
|
|
31
|
+
arr = []; // 微信环境去除支付宝支付、信用卡、谷歌支付
|
|
32
|
+
if (isWx()) {
|
|
33
|
+
arr = arr.concat(['mw.google']);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// 非微信环境隐藏微信支付
|
|
37
|
+
if (!isWx()) {
|
|
38
|
+
arr = arr.concat(['globepay.wechat.jsapi', 'superpay.wechat.h5']);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// 非手机设备 隐藏支付宝
|
|
42
|
+
// if (!isMobile()) {
|
|
43
|
+
// arr = arr.concat(['globepay.alipay.h5', 'superpay.alipay.h5']);
|
|
44
|
+
// }
|
|
45
|
+
|
|
46
|
+
// 非IOS 隐藏苹果支付
|
|
47
|
+
if (!isSafari()) {
|
|
48
|
+
arr = arr.concat(['mw.apple']);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// 按环境过滤支付方式
|
|
52
|
+
paymentList = paymentList.filter(function (d) {
|
|
53
|
+
return !arr.includes(d.service);
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
// 该支付功能暂未启用
|
|
57
|
+
if (!(paymentList.length === 0)) {
|
|
58
|
+
_context.next = 13;
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
return _context.abrupt("return", {
|
|
62
|
+
message: 'component.Payment.toast.the-payment-function-is-not-enabled',
|
|
63
|
+
status: 'error'
|
|
64
|
+
});
|
|
65
|
+
case 13:
|
|
66
|
+
return _context.abrupt("return", {
|
|
67
|
+
message: '',
|
|
68
|
+
status: 'ready',
|
|
69
|
+
paymentList: paymentList
|
|
70
|
+
});
|
|
71
|
+
case 14:
|
|
72
|
+
case "end":
|
|
73
|
+
return _context.stop();
|
|
74
|
+
}
|
|
75
|
+
}, _callee);
|
|
76
|
+
}));
|
|
77
|
+
return function getPaymentList(_x) {
|
|
78
|
+
return _ref.apply(this, arguments);
|
|
79
|
+
};
|
|
80
|
+
}();
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @title: 聚合接口, 根据订单 返回支付列表和钱包
|
|
84
|
+
* @description:
|
|
85
|
+
* @param {object} values
|
|
86
|
+
* @return {*}
|
|
87
|
+
* @Author: zhiwei.Wang
|
|
88
|
+
* @Date: 2024-08-15 11:52
|
|
89
|
+
*/
|
|
90
|
+
export var getPaymentsAndWalletPass = /*#__PURE__*/function () {
|
|
91
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(values) {
|
|
92
|
+
var _yield$request$getReq2, data, walletPass;
|
|
93
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
94
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
95
|
+
case 0:
|
|
96
|
+
_context2.next = 2;
|
|
97
|
+
return request.getRequest().get('/h5/pay/order/payments-and-walletpass', values);
|
|
98
|
+
case 2:
|
|
99
|
+
_yield$request$getReq2 = _context2.sent;
|
|
100
|
+
data = _yield$request$getReq2.data;
|
|
101
|
+
// 找出walletPass
|
|
102
|
+
walletPass = (data.payment_list || []).find(function (d) {
|
|
103
|
+
return d.service === 'pisell.wallet_pass';
|
|
104
|
+
});
|
|
105
|
+
return _context2.abrupt("return", _objectSpread(_objectSpread({}, data), {}, {
|
|
106
|
+
walletPass: walletPass
|
|
107
|
+
}));
|
|
108
|
+
case 6:
|
|
109
|
+
case "end":
|
|
110
|
+
return _context2.stop();
|
|
111
|
+
}
|
|
112
|
+
}, _callee2);
|
|
113
|
+
}));
|
|
114
|
+
return function getPaymentsAndWalletPass(_x2) {
|
|
115
|
+
return _ref2.apply(this, arguments);
|
|
116
|
+
};
|
|
117
|
+
}();
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* @title: 初始化交易组
|
|
121
|
+
* @description:
|
|
122
|
+
* @param {object} values
|
|
123
|
+
* @return {*}
|
|
124
|
+
* @Author: zhiwei.Wang
|
|
125
|
+
* @Date: 2024-08-16 10:42
|
|
126
|
+
*/
|
|
127
|
+
export var getPaymentInit = /*#__PURE__*/function () {
|
|
128
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(values) {
|
|
129
|
+
var _yield$request$getReq3, data;
|
|
130
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
131
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
132
|
+
case 0:
|
|
133
|
+
_context3.next = 2;
|
|
134
|
+
return request.getRequest().post('/h5/pay/payment/init', values);
|
|
135
|
+
case 2:
|
|
136
|
+
_yield$request$getReq3 = _context3.sent;
|
|
137
|
+
data = _yield$request$getReq3.data;
|
|
138
|
+
return _context3.abrupt("return", data);
|
|
139
|
+
case 5:
|
|
140
|
+
case "end":
|
|
141
|
+
return _context3.stop();
|
|
142
|
+
}
|
|
143
|
+
}, _callee3);
|
|
144
|
+
}));
|
|
145
|
+
return function getPaymentInit(_x3) {
|
|
146
|
+
return _ref3.apply(this, arguments);
|
|
147
|
+
};
|
|
148
|
+
}();
|
|
@@ -0,0 +1,82 @@
|
|
|
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 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; }
|
|
3
|
+
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; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
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); }
|
|
7
|
+
// import { getText } from '@/utils/formatMessage';
|
|
8
|
+
// import { PaymentType } from '../../../../../../../my_pisel_h5/src/components/Payment/data';
|
|
9
|
+
// import credit_card from '@/assets/payment/credit_card.png';
|
|
10
|
+
// import wxpay from '@/assets/payment/wxpay.png';
|
|
11
|
+
// import alipay from '@/assets/payment/alipay.png';
|
|
12
|
+
// import google_pay from '@/assets/payment/google_pay.png';
|
|
13
|
+
// import apple_pay from '@/assets/payment/apple_pay.png';
|
|
14
|
+
// import stripe from '@/assets/payment/stripe.png';
|
|
15
|
+
// import bank_deposit from '@/assets/payment/bank_deposit.png';
|
|
16
|
+
// import offline_payment from '@/assets/payment/offline_payment.png';
|
|
17
|
+
// import paypal from '@/assets/payment/paypal.png';
|
|
18
|
+
// import custom from '@/assets/payment/custom.png';
|
|
19
|
+
|
|
20
|
+
export var paymentServices = {
|
|
21
|
+
// stripe支付
|
|
22
|
+
stripe: {
|
|
23
|
+
// url: stripe,
|
|
24
|
+
},
|
|
25
|
+
// 微信支付
|
|
26
|
+
'globepay.wechat.jsapi': {
|
|
27
|
+
// url: wxpay,
|
|
28
|
+
},
|
|
29
|
+
// 微信H5支付
|
|
30
|
+
'superpay.wechat.h5': {
|
|
31
|
+
// url: wxpay,
|
|
32
|
+
channel: ['wx']
|
|
33
|
+
},
|
|
34
|
+
// 支付包H5支付
|
|
35
|
+
'globepay.alipay.h5': {
|
|
36
|
+
// url: alipay,
|
|
37
|
+
channel: ['nowx', 'phone', 'ios']
|
|
38
|
+
},
|
|
39
|
+
'globepay.paypal.h5': {
|
|
40
|
+
// url: paypal,
|
|
41
|
+
channel: ['wx', 'nowx', 'phone', 'ios']
|
|
42
|
+
},
|
|
43
|
+
'superpay.alipay.h5': {
|
|
44
|
+
// url: alipay,
|
|
45
|
+
},
|
|
46
|
+
'mw.google': {
|
|
47
|
+
// url: google_pay,
|
|
48
|
+
},
|
|
49
|
+
'mw.apple': {
|
|
50
|
+
// url: apple_pay,
|
|
51
|
+
},
|
|
52
|
+
'mw.credit_card': {
|
|
53
|
+
// url: credit_card,
|
|
54
|
+
},
|
|
55
|
+
'pisell.bank_deposit': {
|
|
56
|
+
// url: bank_deposit,
|
|
57
|
+
},
|
|
58
|
+
'pisell.offline_payment': {
|
|
59
|
+
// url: offline_payment,
|
|
60
|
+
},
|
|
61
|
+
'pisell.other.cashmanual': {
|
|
62
|
+
// url: custom,
|
|
63
|
+
},
|
|
64
|
+
'pisell.custom_payment': {
|
|
65
|
+
// url: custom,
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
var getPaymentTypes = function getPaymentTypes() {
|
|
69
|
+
var arr = [];
|
|
70
|
+
for (var key in paymentServices) {
|
|
71
|
+
arr.push(_objectSpread({
|
|
72
|
+
service: key
|
|
73
|
+
}, paymentServices[key]));
|
|
74
|
+
}
|
|
75
|
+
return arr;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
//支付类型列表
|
|
79
|
+
export var paymentTypes = getPaymentTypes();
|
|
80
|
+
export var paymentKeys = Object.keys(paymentServices);
|
|
81
|
+
|
|
82
|
+
// H5 分为 微信环境 非微信环境 手机环境 IOS环境
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { PayGroup } from "./model";
|
|
2
|
+
/**
|
|
3
|
+
* 计算walletPass列表数据的总金额
|
|
4
|
+
* @param list
|
|
5
|
+
*/
|
|
6
|
+
export declare const calcWalletPassListAmount: (list: any[]) => any;
|
|
7
|
+
/**
|
|
8
|
+
* 将walletPass列表数据转换为prepare_payments需要的数据格式
|
|
9
|
+
* @param list
|
|
10
|
+
*/
|
|
11
|
+
export declare const formatWalletPassList2PreparePayments: (list?: any[]) => {
|
|
12
|
+
voucher_id: any;
|
|
13
|
+
amount: number;
|
|
14
|
+
tag: any;
|
|
15
|
+
}[];
|
|
16
|
+
/**
|
|
17
|
+
* walletPass支付params
|
|
18
|
+
* @param payGroup
|
|
19
|
+
*/
|
|
20
|
+
export declare const formatWalletPassParams: (payGroup: PayGroup) => {
|
|
21
|
+
order_id: string;
|
|
22
|
+
payment_group_id: number;
|
|
23
|
+
payments: {
|
|
24
|
+
amount: any;
|
|
25
|
+
wallet_pass_use_value: any;
|
|
26
|
+
voucher_id: any;
|
|
27
|
+
tag: any;
|
|
28
|
+
wallet_pass_usage_unit: any;
|
|
29
|
+
}[];
|
|
30
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Decimal } from 'decimal.js';
|
|
2
|
+
/**
|
|
3
|
+
* 计算walletPass列表数据的总金额
|
|
4
|
+
* @param list
|
|
5
|
+
*/
|
|
6
|
+
export var calcWalletPassListAmount = function calcWalletPassListAmount(list) {
|
|
7
|
+
return list.reduce(function (pre, cur) {
|
|
8
|
+
return pre.add(new Decimal(String(cur.available_max_amount || 0)));
|
|
9
|
+
}, new Decimal('0')).toNumber();
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* 将walletPass列表数据转换为prepare_payments需要的数据格式
|
|
14
|
+
* @param list
|
|
15
|
+
*/
|
|
16
|
+
export var formatWalletPassList2PreparePayments = function formatWalletPassList2PreparePayments(list) {
|
|
17
|
+
return (list || []).map(function (item) {
|
|
18
|
+
return {
|
|
19
|
+
voucher_id: item.id || 0,
|
|
20
|
+
amount: Number(item.available_max_amount) || 0,
|
|
21
|
+
tag: item.tag || ''
|
|
22
|
+
};
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* walletPass支付params
|
|
28
|
+
* @param payGroup
|
|
29
|
+
*/
|
|
30
|
+
export var formatWalletPassParams = function formatWalletPassParams(payGroup) {
|
|
31
|
+
var order_id = payGroup.order_id,
|
|
32
|
+
payment_group_id = payGroup.payment_group_id,
|
|
33
|
+
walletPass = payGroup.walletPass;
|
|
34
|
+
var payments = (walletPass === null || walletPass === void 0 ? void 0 : walletPass.cards.map(function (item) {
|
|
35
|
+
return {
|
|
36
|
+
amount: item.available_max_amount,
|
|
37
|
+
wallet_pass_use_value: item.available_max_par_value,
|
|
38
|
+
voucher_id: item.id,
|
|
39
|
+
tag: item.tag,
|
|
40
|
+
wallet_pass_usage_unit: item.wallet_pass_usage_unit
|
|
41
|
+
};
|
|
42
|
+
})) || [];
|
|
43
|
+
return {
|
|
44
|
+
order_id: order_id,
|
|
45
|
+
payment_group_id: payment_group_id,
|
|
46
|
+
payments: payments
|
|
47
|
+
};
|
|
48
|
+
};
|
|
@@ -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,7 +69,7 @@ export interface FormState {
|
|
|
68
69
|
};
|
|
69
70
|
setGlobalState: Function | null;
|
|
70
71
|
}
|
|
71
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
72
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
72
73
|
state: FormState;
|
|
73
74
|
} & {
|
|
74
75
|
dispatch: (params: {
|
package/es/index.d.ts
CHANGED
|
@@ -16,5 +16,6 @@ export { default as ProductExtension } from './components/productExtension';
|
|
|
16
16
|
export { default as BookingDeposit } from './components/booking/deposit';
|
|
17
17
|
export { default as RuleSetting } from './components/ruleSetting';
|
|
18
18
|
export { default as TaxSelect } from './components/taxSelect';
|
|
19
|
+
export { default as ToCPay } from './components/pay/toC';
|
|
19
20
|
export { default as Eftpos } from './components/eftpos';
|
|
20
21
|
export { default as EftposPay } from './components/eftposPay';
|
package/es/index.js
CHANGED
|
@@ -20,5 +20,6 @@ export { default as ProductExtension } from "./components/productExtension";
|
|
|
20
20
|
export { default as BookingDeposit } from "./components/booking/deposit";
|
|
21
21
|
export { default as RuleSetting } from "./components/ruleSetting";
|
|
22
22
|
export { default as TaxSelect } from "./components/taxSelect";
|
|
23
|
+
export { default as ToCPay } from "./components/pay/toC";
|
|
23
24
|
export { default as Eftpos } from "./components/eftpos";
|
|
24
25
|
export { default as EftposPay } from "./components/eftposPay";
|
package/es/utils/index.d.ts
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import type { ModalStaticFunctions } from
|
|
1
|
+
import type { ModalStaticFunctions } from 'antd/es/modal/confirm';
|
|
2
2
|
declare type RType = (url: string, data?: {} | undefined, config?: {} | undefined) => Promise<any>;
|
|
3
3
|
declare class Request {
|
|
4
4
|
private request;
|
|
5
5
|
constructor();
|
|
6
6
|
setRequest(val: any): void;
|
|
7
|
+
withCustomToast(config?: any): any;
|
|
7
8
|
getRequest(): {
|
|
8
|
-
get:
|
|
9
|
-
post:
|
|
9
|
+
get: (url: string, params: any, config?: any) => Promise<any>;
|
|
10
|
+
post: (url: string, params: any, config?: any) => Promise<any>;
|
|
10
11
|
put: RType;
|
|
11
12
|
remove: RType;
|
|
12
13
|
custom: RType;
|
|
13
14
|
};
|
|
14
15
|
}
|
|
15
16
|
export declare const request: Request;
|
|
16
|
-
declare let modal: Omit<ModalStaticFunctions,
|
|
17
|
-
export declare const setModal: (m: Omit<ModalStaticFunctions,
|
|
17
|
+
declare let modal: Omit<ModalStaticFunctions, 'warn'>;
|
|
18
|
+
export declare const setModal: (m: Omit<ModalStaticFunctions, 'warn'>) => void;
|
|
18
19
|
export declare const saveConfirm: () => Promise<{
|
|
19
20
|
destroy: () => void;
|
|
20
21
|
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
package/es/utils/index.js
CHANGED
|
@@ -2,13 +2,16 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
2
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
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
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; }
|
|
5
7
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
6
8
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
7
9
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
8
10
|
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; }
|
|
9
11
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
10
12
|
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); }
|
|
11
|
-
import { locales } from
|
|
13
|
+
import { locales } from '@pisell/utils';
|
|
14
|
+
import { PisellToast } from '@pisell/materials';
|
|
12
15
|
var Request = /*#__PURE__*/function () {
|
|
13
16
|
function Request() {
|
|
14
17
|
_classCallCheck(this, Request);
|
|
@@ -19,10 +22,29 @@ var Request = /*#__PURE__*/function () {
|
|
|
19
22
|
value: function setRequest(val) {
|
|
20
23
|
this.request = val;
|
|
21
24
|
}
|
|
25
|
+
}, {
|
|
26
|
+
key: "withCustomToast",
|
|
27
|
+
value: function withCustomToast(config) {
|
|
28
|
+
return _objectSpread(_objectSpread({}, config || {}), {}, {
|
|
29
|
+
customToast: function customToast(msg) {
|
|
30
|
+
return PisellToast({
|
|
31
|
+
content: msg
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}
|
|
22
36
|
}, {
|
|
23
37
|
key: "getRequest",
|
|
24
38
|
value: function getRequest() {
|
|
25
|
-
|
|
39
|
+
var _this = this;
|
|
40
|
+
return _objectSpread(_objectSpread({}, this.request), {}, {
|
|
41
|
+
get: function get(url, params, config) {
|
|
42
|
+
return _this.request.get(url, params, _this.withCustomToast(config));
|
|
43
|
+
},
|
|
44
|
+
post: function post(url, params, config) {
|
|
45
|
+
return _this.request.post(url, params, _this.withCustomToast(config));
|
|
46
|
+
}
|
|
47
|
+
});
|
|
26
48
|
}
|
|
27
49
|
}]);
|
|
28
50
|
return Request;
|
|
@@ -38,10 +60,10 @@ export var saveConfirm = /*#__PURE__*/function () {
|
|
|
38
60
|
while (1) switch (_context.prev = _context.next) {
|
|
39
61
|
case 0:
|
|
40
62
|
return _context.abrupt("return", modal.confirm({
|
|
41
|
-
title: locales.getText(
|
|
42
|
-
content: locales.getText(
|
|
43
|
-
cancelText: locales.getText(
|
|
44
|
-
okText: locales.getText(
|
|
63
|
+
title: locales.getText('pisell2.text.products.unsaved-title'),
|
|
64
|
+
content: locales.getText('pisell2.text.products.unsaved-content'),
|
|
65
|
+
cancelText: locales.getText('pisell2.text.products.unsaved-back'),
|
|
66
|
+
okText: locales.getText('pisell2.text.products.unsaved-yes')
|
|
45
67
|
}));
|
|
46
68
|
case 1:
|
|
47
69
|
case "end":
|
|
@@ -13,5 +13,5 @@ export interface InfoProps {
|
|
|
13
13
|
setGlobalState: any;
|
|
14
14
|
}
|
|
15
15
|
export declare const formatProducts: (values: any) => any;
|
|
16
|
-
declare const Addons:
|
|
16
|
+
declare const Addons: any;
|
|
17
17
|
export default Addons;
|