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

bugfix: 修复登出问题

parent 3660f01d
......@@ -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 {
......
......@@ -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
}
......
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