From 1f8387f7f8c3e12bf360231ed6d1f9a4925eaf19 Mon Sep 17 00:00:00 2001 From: czm <2192718639@qq.com> Date: Mon, 6 Feb 2023 18:19:34 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(ID1001211=E9=A2=84=E4=BB=98?= =?UTF-8?q?=E6=AC=BE=E9=80=89=E6=8B=A9=E9=A2=84=E5=AD=98=E8=B4=A7=E6=AC=BE?= =?UTF-8?q?=E6=97=B6=E6=97=A0=E6=B3=95=E9=80=89=E6=8B=A9):?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/constant.ts | 4 +-- src/pages/order/components/payment/index.tsx | 35 +++++++++++--------- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/src/common/constant.ts b/src/common/constant.ts index 52a5e1f..7633c55 100644 --- a/src/common/constant.ts +++ b/src/common/constant.ts @@ -1,11 +1,11 @@ -export const BASE_URL = CURRENT_BASE_URL +// export const BASE_URL = CURRENT_BASE_URL // export const BASE_URL = `http://192.168.0.75:50001/lymarket` // export const BASE_URL = `http://192.168.0.89:50001/lymarket` // export const BASE_URL = `http://10.0.0.5:50001/lymarket` // export const BASE_URL = `http://192.168.0.89:40001/lymarket` // export const BASE_URL = `http://192.168.1.165:40001/lymarket` // 王霞 // export const BASE_URL = 'https://test.zzfzyc.com/lymarket' // 测试环境 -// export const BASE_URL = 'https://pre.zzfzyc.com/lymarket' // 预发布 +export const BASE_URL = 'https://pre.zzfzyc.com/lymarket' // 预发布 // export const BASE_URL = `http://192.168.1.9:40001/lymarket` // 发 // export const BASE_URL = `http://192.168.1.9:50005/lymarket` // 发 // export const BASE_URL = `http://192.168.1.30:50001/lymarket` // 发 diff --git a/src/pages/order/components/payment/index.tsx b/src/pages/order/components/payment/index.tsx index 939b0eb..3435922 100644 --- a/src/pages/order/components/payment/index.tsx +++ b/src/pages/order/components/payment/index.tsx @@ -90,11 +90,11 @@ const Payment = ({ show = false, onClose, orderInfo, onSubmitSuccess }: Param) = // 预存款选择 const advanceRef = useRef(null) - const advanceSelectData = useCallback((val) => { + const advanceSelectData = useCallback(async(val) => { setSubmitData(e => ({ ...e, payment_method: val })) }, []) - const changeSelect = async() => { - await openSubscriptionMessage({ orderId: orderInfo?.id, scenes: ToPay.value }) + const changeSelect = async(e) => { + e.stopPropagation() advanceRef.current.onSelectEven() } @@ -120,12 +120,13 @@ const Payment = ({ show = false, onClose, orderInfo, onSubmitSuccess }: Param) = return false } // 账期支付,或预付款并且不是剪板才会订阅 - if ( - (submitData.payment_method == PaymentMethodAccountPeriod.value || orderInfo?.status == SaleorderstatusWaitingPrePayment.value) - && orderInfo?.sale_mode != 1 - ) { - await openSubscriptionMessage({ orderId: orderInfo?.id, scenes: ToPay.value }) - } + // if ( + // (submitData.payment_method == PaymentMethodAccountPeriod.value || orderInfo?.status == SaleorderstatusWaitingPrePayment.value) + // && orderInfo?.sale_mode != 1 + // ) { + // await openSubscriptionMessage({ orderId: orderInfo?.id, scenes: ToPay.value }) + // } + await openSubscriptionMessage({ orderId: orderInfo?.id, scenes: ToPay.value }) alert.showLoading('正在支付') let res: any = null if (orderInfo?.should_collect_order_id) { @@ -224,7 +225,7 @@ const Payment = ({ show = false, onClose, orderInfo, onSubmitSuccess }: Param) = - + changeSelect(e)}> @@ -232,12 +233,14 @@ const Payment = ({ show = false, onClose, orderInfo, onSubmitSuccess }: Param) = {advance_payment} - advanceSelectData(PaymentMethodPreDeposit.value)} - onClose={() => advanceSelectData(null)} - /> + e.stopPropagation()}> + advanceSelectData(PaymentMethodPreDeposit.value)} + onClose={() => advanceSelectData(null)} + /> +