diff --git a/src/pages/frame/services/accountService.js b/src/pages/frame/services/accountService.js index 0becd66a5444108e5a4c48c8d9b27b55b0e4f186..0954a0404a0d31e1ba2ff5ba02eaa2d452153089 100644 --- a/src/pages/frame/services/accountService.js +++ b/src/pages/frame/services/accountService.js @@ -25,9 +25,11 @@ export function logout() { // localStorage.removeItem(process.env.VUE_APP_PERMISSIONS_KEY); // localStorage.removeItem(process.env.VUE_APP_ROLES_KEY); // localStorage.removeItem(process.env.VUE_APP_USER_KEY); - clearToken(); - clearUserId(); - return logoutApi(); + return logoutApi().then(res => { + clearToken(); + clearUserId(); + return res; + }); } export default { diff --git a/src/pages/frame/view/login/Login.vue b/src/pages/frame/view/login/Login.vue index 28052e07da6cb079aa8eed32819725f0045473c3..95c4d8bee175cea566ef97708b5d21d2516130df 100644 --- a/src/pages/frame/view/login/Login.vue +++ b/src/pages/frame/view/login/Login.vue @@ -115,7 +115,7 @@ export default { const { token, userId } = result; setToken(token); setUserId(userId); - this.$router.replace('/dashboard/workbench'); + this.$router.replace('/'); } catch (error) { // todo }