From ee0d5f202e83029ebbe58e4995c2f8093818bd77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E5=BA=86?= <18331150170@163.com> Date: Mon, 17 Nov 2025 21:35:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=89=AB=E7=A0=81=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E9=87=8D=E5=A4=8D=E8=A7=A6=E5=8F=91=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/pages/pgMaster/components/dataItem.vue | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/mes-ui/mini-app/src/pages/pgMaster/components/dataItem.vue b/mes-ui/mini-app/src/pages/pgMaster/components/dataItem.vue index 79748826..f9fb1561 100644 --- a/mes-ui/mini-app/src/pages/pgMaster/components/dataItem.vue +++ b/mes-ui/mini-app/src/pages/pgMaster/components/dataItem.vue @@ -76,12 +76,10 @@ const getListData = async () => { // 发送请求 try { const data = await getListAPIWX(queryParams) - isLoading.value = false + if (data.data!=null){ uni.showToast({ title: data.data, icon: 'none' }) - isScan.value=true; - //等待三秒再次打开扫码窗口 setTimeout(() => { handleScan() }, delay.value * 1000); @@ -159,18 +157,22 @@ const viewClick = async (item) => { } }; const handleScan = async() => { + if (isScan.value) return + isScan.value = true uni.scanCode({ success: async(res) => { isFromScan.value = true searchVal.value = res.result await handleSearch({ inputValue: res.result }) isFromScan.value = false - if (isScan.value){ - handleScan() - } }, fail: () => { uni.showToast({ title: '扫码失败或用户取消扫码', icon: 'none' }) + }, + complete: () => { + setTimeout(() => { + isScan.value = false; + }, 200); // 给一点缓冲 } }) }