From 81cd2cbf71a1faec23413404599554504e5f83a7 Mon Sep 17 00:00:00 2001 From: zq <136432190602163.com> Date: Thu, 5 Jun 2025 16:58:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=AB=E7=A0=81=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5=E8=BF=94=E5=9B=9E=E5=90=8E=E6=8F=90=E7=A4=BA=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/tabbar.vue | 23 ++++++++++++++++++----- pages/visitors/visitors.vue | 2 +- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/components/tabbar.vue b/components/tabbar.vue index 250c9bc..f6fb839 100644 --- a/components/tabbar.vue +++ b/components/tabbar.vue @@ -95,11 +95,24 @@ var url = `/${res.path}`; uni.navigateTo({ url }); }, - fail: (err) => { - uni.showToast({ - title: '扫码失败'+JSON.stringify(err), - icon: 'none' - }) + // fail: (err) => { + // uni.showToast({ + // title: '扫码失败'+JSON.stringify(err), + // icon: 'none' + // }) + // } + complete(res) { + // console.log('其他错误:', res); + if (res.errMsg === 'scanCode:ok') { + console.log('扫码成功:', res.result); + } else if (res.errMsg === 'scanCode:fail cancel') { + console.log('用户取消扫码'); + } else { + uni.showToast({ + title: '扫码失败'+JSON.stringify(res.errMsg), + icon: 'none' + }) + } } }) // #endif diff --git a/pages/visitors/visitors.vue b/pages/visitors/visitors.vue index e8a70a6..fe467fe 100644 --- a/pages/visitors/visitors.vue +++ b/pages/visitors/visitors.vue @@ -513,7 +513,7 @@ width: 100%; top: 82.41%; .submitbtn{ - width: 646rpx; + // width: 646rpx; margin: 0 auto; } .tip{