From 38bdca2409186c6fadbc2e332a032a21368656fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Wed, 27 Nov 2024 18:51:54 +0800 Subject: [PATCH] fix: qrcode login --- napcat.webui/src/components/QQLogin.vue | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/napcat.webui/src/components/QQLogin.vue b/napcat.webui/src/components/QQLogin.vue index e1e4eccb..a5e27c72 100644 --- a/napcat.webui/src/components/QQLogin.vue +++ b/napcat.webui/src/components/QQLogin.vue @@ -58,6 +58,9 @@ let qrcodeUrl: string = ''; const selectAccount = async (accountName: string): Promise => { const { result, errMsg } = await qqLoginManager.setQuickLogin(accountName); if (result) { + if (heartBeatTimer) { + clearInterval(heartBeatTimer); + } await MessagePlugin.success('登录成功即将跳转'); await router.push({ path: '/dashboard/basic-info' }); } else { @@ -85,10 +88,11 @@ const HeartBeat = async (): Promise => { if (heartBeatTimer) { clearInterval(heartBeatTimer); } - //判断是否已经调转 - if (router.currentRoute.value.path !== '/dashboard/basic-info') { - return; - } + // //判断是否已经调转 + // if (router.currentRoute.value.path !== '/dashboard/basic-info') { + // return; + // } + await MessagePlugin.success('登录成功即将跳转'); await router.push({ path: '/dashboard/basic-info' }); } else if (isLogined?.qrcodeurl && qrcodeUrl !== isLogined.qrcodeurl) { qrcodeUrl = isLogined.qrcodeurl;