Commit 5efc64b4 authored by 水落(YangLei)'s avatar 水落(YangLei)

bugfix: 修复登出问题

parent 3660f01d
...@@ -25,9 +25,11 @@ export function logout() { ...@@ -25,9 +25,11 @@ export function logout() {
// localStorage.removeItem(process.env.VUE_APP_PERMISSIONS_KEY); // localStorage.removeItem(process.env.VUE_APP_PERMISSIONS_KEY);
// localStorage.removeItem(process.env.VUE_APP_ROLES_KEY); // localStorage.removeItem(process.env.VUE_APP_ROLES_KEY);
// localStorage.removeItem(process.env.VUE_APP_USER_KEY); // localStorage.removeItem(process.env.VUE_APP_USER_KEY);
clearToken(); return logoutApi().then(res => {
clearUserId(); clearToken();
return logoutApi(); clearUserId();
return res;
});
} }
export default { export default {
......
...@@ -115,7 +115,7 @@ export default { ...@@ -115,7 +115,7 @@ export default {
const { token, userId } = result; const { token, userId } = result;
setToken(token); setToken(token);
setUserId(userId); setUserId(userId);
this.$router.replace('/dashboard/workbench'); this.$router.replace('/');
} catch (error) { } catch (error) {
// todo // todo
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment