From 93815a8ea9b303b0882d0f02f5c6b9bffd910a39 Mon Sep 17 00:00:00 2001 From: huliyong <2783385703@qq.com> Date: Wed, 5 Nov 2025 20:36:36 +0800 Subject: [PATCH] =?UTF-8?q?fix(auth):=20=E4=BC=98=E5=8C=96=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E7=99=BB=E5=BD=95=E5=9B=9E=E8=B0=83=E5=A4=84=E7=90=86?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将H5环境下的微信授权回调检查从mounted移到created生命周期 在登录成功后添加H5环境下的页面跳转逻辑 --- pages_order/auth/wxLogin.vue | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pages_order/auth/wxLogin.vue b/pages_order/auth/wxLogin.vue index db8cb66..3dbbc48 100644 --- a/pages_order/auth/wxLogin.vue +++ b/pages_order/auth/wxLogin.vue @@ -67,13 +67,10 @@ if(query.path){ this.config = query } + // #ifdef H5 + this.checkWechatAuthCallback(); + // #endif }, - // #ifdef H5 - mounted() { - // H5环境下检查URL参数,处理微信授权回调 - this.checkWechatAuthCallback(); - }, - // #endif methods: { // 微信登录统一入口 handleLogin() { @@ -194,6 +191,10 @@ }); return; } else { + // #ifdef H5 + window.location = 'https://h5.budingxiaoshuo.com' + return + // #endif uni.showToast({ title: '登录成功', icon: 'success'