From 4448ccf1118c6c67e8e2c16629c7ac11c41dea7d Mon Sep 17 00:00:00 2001 From: zclzone Date: Mon, 18 Dec 2023 22:32:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=8D=95=E8=8E=B7=E9=80=80=E5=87=BA?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E5=BC=82=E5=B8=B8=EF=BC=8C=E4=B8=8D=E9=98=BB?= =?UTF-8?q?=E6=AD=A2=E9=80=80=E5=87=BA=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/components/UserAvatar.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/layouts/components/UserAvatar.vue b/src/layouts/components/UserAvatar.vue index 030b521..dc34cf7 100644 --- a/src/layouts/components/UserAvatar.vue +++ b/src/layouts/components/UserAvatar.vue @@ -72,7 +72,11 @@ function handleSelect(key) { type: 'info', content: '确认退出?', async confirm() { - await api.logout() + try { + await api.logout() + } catch (error) { + console.error(error) + } authStore.logout() $message.success('已退出登录') },