From 882ec0a1b8e934b1a3f84e47fcd35fac4b2b697d Mon Sep 17 00:00:00 2001 From: sexygoat <1538832180@qq.com> Date: Fri, 17 Apr 2026 16:55:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=89=AB=E4=B8=80=E6=89=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/login/login.vue | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pages/login/login.vue b/pages/login/login.vue index 9a912e9..b57bdf2 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -140,10 +140,10 @@ const handleScanLogin = async () => { // #ifdef H5 try { // 检查是否在微信环境 - // if (!isInWechat()) { - // uni.showToast({ title: '请在微信中打开', icon: 'none' }); - // return; - // } + if (!isInWechat()) { + uni.showToast({ title: '请在微信中打开', icon: 'none' }); + return; + } // 调用扫一扫 const resultStr = await wxScan(); @@ -170,12 +170,12 @@ const handleScanLogin = async () => { } } catch (err) { console.error('扫码错误:', err); - uni.showToast({ title: JSON.stringify(err), icon: 'none' }); + // uni.showToast({ title: JSON.stringify(err), icon: 'none' }); } - // // #endif - // // #ifndef H5 - // uni.showToast({ title: '请在微信中打开', icon: 'none' }); - // // #endif + // #endif + // #ifndef H5 + uni.showToast({ title: '请在微信中打开', icon: 'none' }); + // #endif }; const getPathDeviceId = () => {