From 47fbe47e729d561eae20ca0e3b2b6acf7fde67d2 Mon Sep 17 00:00:00 2001 From: kuaileWu <1432334894@qq.com> Date: Wed, 4 Jun 2025 10:26:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E5=86=85=E9=83=A8?= =?UTF-8?q?=E8=B0=83=E7=94=A8=E5=BE=AE=E4=BF=A1=E6=89=AB=E4=B8=80=E6=89=AB?= =?UTF-8?q?=E5=90=8E=20=E6=97=A0=E6=B3=95=E6=89=AB=E6=8F=8F=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E5=B0=8F=E7=A8=8B=E5=BA=8F=E4=BA=8C=E7=BB=B4=E7=A0=81?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E5=8F=8D=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/tabbar.vue | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/components/tabbar.vue b/components/tabbar.vue index b24c9c5..c9b2b7e 100644 --- a/components/tabbar.vue +++ b/components/tabbar.vue @@ -84,15 +84,17 @@ async scanCode() { // #ifdef MP-WEIXIN uni.scanCode({ - onlyFromCamera: false, - success: (res) => { - console.log('扫码结果:', res.result); - }, - fail: (err) => { - console.error('扫码失败:', err); - // uni.showToast({ title: '扫码失败', icon: 'none' }); - } - }); + success: (res) => { + var url = `/${res.path}`; + uni.navigateTo({ url }); + }, + fail: (err) => { + uni.showToast({ + title: '扫码失败'+JSON.stringify(err), + icon: 'none' + }) + } + }) // #endif // #ifdef H5