From 088826881b808a08e5fac37f4b0f3948e5f621e9 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Fri, 14 Mar 2025 17:11:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BB=A3=E5=AE=A2?= =?UTF-8?q?=E4=B8=8B=E5=8D=95=E5=B7=A6=E8=BE=B9=E8=B4=AD=E7=89=A9=E8=BD=A6?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E7=AB=8B=E5=8D=B3=E6=94=AF=E4=BB=98=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E8=AE=A2=E5=8D=95=E7=94=9F=E6=88=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/tool/Instead/index.vue | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/views/tool/Instead/index.vue b/src/views/tool/Instead/index.vue index 700d337..de6217f 100644 --- a/src/views/tool/Instead/index.vue +++ b/src/views/tool/Instead/index.vue @@ -343,21 +343,25 @@ async function createOrder(key) { refOrder.value.nowPayClick("cash"); return; } - clearTimeout(loadingTimer); - loading = ElLoading.service({ - lock: true, - text: "订单生成中,请稍等……", - background: "rgba(0, 0, 0, 0.7)", - }); - loadingTimer = setTimeout(() => { - ElMessage.error("订单生成超时"); - loading.close(); - }, 1000 * 20); + try { if (key == "to-pay" && carts.list.length <= 0 && oldOrder.value.id) { showOrder.value = true; + nextTick(() => { + refOrder.value.nowPayClick(); + }); return; } + clearTimeout(loadingTimer); + loading = ElLoading.service({ + lock: true, + text: "订单生成中,请稍等……", + background: "rgba(0, 0, 0, 0.7)", + }); + loadingTimer = setTimeout(() => { + ElMessage.error("订单生成超时"); + loading.close(); + }, 1000 * 20); const res = await orderApi.add({ orderId: oldOrder.value.id || "", shopId: shopUser.userInfo.id,