From bf8866e1a585a7062d0acac208c04de84c32e47d Mon Sep 17 00:00:00 2001 From: czm <2192718639@qq.com> Date: Thu, 12 Jan 2023 11:56:46 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=88=20perf(ID1000877=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E8=A7=A6=E5=8F=91=E4=BD=8D=E7=BD=AE=E8=B0=83?= =?UTF-8?q?=E6=95=B4):?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/order/components/payment/index.tsx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/pages/order/components/payment/index.tsx b/src/pages/order/components/payment/index.tsx index 07d535b..939b0eb 100644 --- a/src/pages/order/components/payment/index.tsx +++ b/src/pages/order/components/payment/index.tsx @@ -50,14 +50,16 @@ const Payment = ({ show = false, onClose, orderInfo, onSubmitSuccess }: Param) = // 线下付款 const [offlinePayShow, setofflinePayShow] = useState(false) - const onShowOfflinePay = () => { + const onShowOfflinePay = async() => { + await openSubscriptionMessage({ orderId: orderInfo?.id, scenes: ToPay.value }) setofflinePayShow(true) // onClose?.() } // 扫码支付 const [scanPayShow, setScanPayShow] = useState(false) - const onShowScanPay = () => { + const onShowScanPay = async() => { + await openSubscriptionMessage({ orderId: orderInfo?.id, scenes: ToPay.value }) setScanPayShow(true) onClose?.() } @@ -91,7 +93,8 @@ const Payment = ({ show = false, onClose, orderInfo, onSubmitSuccess }: Param) = const advanceSelectData = useCallback((val) => { setSubmitData(e => ({ ...e, payment_method: val })) }, []) - const changeSelect = () => { + const changeSelect = async() => { + await openSubscriptionMessage({ orderId: orderInfo?.id, scenes: ToPay.value }) advanceRef.current.onSelectEven() } @@ -190,6 +193,10 @@ const Payment = ({ show = false, onClose, orderInfo, onSubmitSuccess }: Param) = } } const { pullBank, payStatus } = usePayBank({ merchId: payInfo?.merch_id, custMerchId: payInfo?.pay_no, callBack: bankCallBack }) + const openBank = async() => { + await openSubscriptionMessage({ orderId: orderInfo?.id, scenes: ToPay.value }) + pullBank() + } return ( @@ -232,7 +239,7 @@ const Payment = ({ show = false, onClose, orderInfo, onSubmitSuccess }: Param) = onClose={() => advanceSelectData(null)} /> - +