From 66656304f991ab2b0c4fe88a178347bc2522a972 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: Sun, 15 Sep 2024 16:24:08 +0800 Subject: [PATCH] fix --- src/shell/napcat.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/shell/napcat.ts b/src/shell/napcat.ts index e28c75dc..6943110f 100644 --- a/src/shell/napcat.ts +++ b/src/shell/napcat.ts @@ -141,11 +141,13 @@ export async function NCoreInitShell() { }; loginListener.onQRCodeSessionFailed = (errType: number, errCode: number, errMsg: string) => { //logger.logError('登录失败(onQRCodeSessionFailed)', errCode, errMsg); - logger.logError('[Core] [Login] Login Error,ErrCode: ', errCode, ' ErrMsg:', errMsg); - if (errType == 1 && errCode == 3) { - // 二维码过期刷新 + if (!isLogined) { + logger.logError('[Core] [Login] Login Error,ErrCode: ', errCode, ' ErrMsg:', errMsg); + if (errType == 1 && errCode == 3) { + // 二维码过期刷新 + } + loginService.getQRCodePicture(); } - if (!isLogined) loginService.getQRCodePicture(); }; loginListener.onLoginFailed = (args) => { //logger.logError('登录失败(onLoginFailed)', args);