From b157d6f1bca216a0912375cdbd92297f41ce7551 Mon Sep 17 00:00:00 2001 From: wangtaocs Date: Thu, 28 Nov 2024 10:19:54 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20:sparkles:=20=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E6=88=90=E5=8A=9F=E8=BF=94=E5=9B=9E=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/login/index.vue | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue index da1a4c4..8455942 100644 --- a/src/pages/login/index.vue +++ b/src/pages/login/index.vue @@ -97,6 +97,16 @@ const handleWechatLogin = async () => { title: "登录成功", icon: "success", }); + + const pages = getCurrentPages(); + + if (pages.length > 1) { + uni.navigateBack(); + } else { + uni.reLaunch({ + url: "/pages/index/index", + }); + } } } catch (error: any) { console.error("微信登录失败", error);