From 5855ffa0442395f36faca2bf4a51fd5d1e052f62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A6=99=E7=A0=81=E7=94=9F=E8=8A=B1?= <18523774412@qq.com> Date: Wed, 29 Jun 2022 20:30:42 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=E4=BC=9A=E5=91=98=E6=B3=A8=E9=94=80?= =?UTF-8?q?=E5=AE=8C=E5=96=84=E3=80=81=E4=BF=AE=E6=94=B9=E5=AF=86=E7=A0=81?= =?UTF-8?q?=E5=90=8E=E8=87=AA=E5=8A=A8=E6=B3=A8=E9=94=80=E4=BC=9A=E5=91=98?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/layouts/frontend/components/header.vue | 14 +------------- web/src/stores/userInfo.ts | 11 +++++++++++ .../views/frontend/user/account/changePassword.vue | 6 +++--- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/web/src/layouts/frontend/components/header.vue b/web/src/layouts/frontend/components/header.vue index 41a28b28..cad704a7 100644 --- a/web/src/layouts/frontend/components/header.vue +++ b/web/src/layouts/frontend/components/header.vue @@ -19,7 +19,7 @@ {{ $t('index.Member Center') }} - {{ $t('user.user.Logout login') }} + {{ $t('user.user.Logout login') }} {{ $t('index.Member Center') }} @@ -50,10 +50,7 @@ import { useSiteConfig } from '/@/stores/siteConfig' import { useConfig } from '/@/stores/config' import { useMemberCenter } from '/@/stores/memberCenter' import { editDefaultLang } from '/@/lang/index' -import { postLogout } from '/@/api/frontend/user/index' import 'element-plus/theme-chalk/display.css' -import { Local } from '/@/utils/storage' -import { USER_INFO } from '/@/stores/constant/cacheKey' import Aside from '/@/layouts/frontend/components/aside.vue' import 'element-plus/theme-chalk/display.css' @@ -76,15 +73,6 @@ switch (route.name) { state.activeMenu = 'user' break } - -const logout = () => { - postLogout().then((res) => { - if (res.code == 1) { - Local.remove(USER_INFO) - router.go(0) - } - }) -}