From 4a69fe45d8c912e77799475b16bd904c100a1334 Mon Sep 17 00:00:00 2001 From: wangxiang <1827945911@qq.com> Date: Mon, 4 Sep 2023 10:37:55 +0800 Subject: [PATCH] fix: logout err out --- src/store/modules/user.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 3fca51c..6df8ff0 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -177,7 +177,9 @@ export const useUserStore = defineStore({ }, /** 登出 */ async logout(goLogin = false) { - await logout(); + try { + await logout(); + } catch(e) { console.warn(e); } this.resetState(); this.setAccessToken(''); this.setRefreshToken('');