Commit 42e9eb8a authored by 李鹏 's avatar 李鹏

修改退出登录菜单显示问题

parent e917fcc2
...@@ -210,6 +210,7 @@ export default { ...@@ -210,6 +210,7 @@ export default {
if (res.data.code == "200") { if (res.data.code == "200") {
window.location.href = "/so/manage/ui/#/login"; window.location.href = "/so/manage/ui/#/login";
this.$store.commit("setUserInfo", null); this.$store.commit("setUserInfo", null);
this.$store.commit("setMenu", null);
clearCookie("bgToken"); clearCookie("bgToken");
this.$message.success("退出成功"); this.$message.success("退出成功");
resetRouter(); resetRouter();
......
...@@ -28,6 +28,8 @@ const toLogin = () => { ...@@ -28,6 +28,8 @@ const toLogin = () => {
let path = router.currentRoute.value.path; let path = router.currentRoute.value.path;
//白名单中的401不做跳转 //白名单中的401不做跳转
if (!store.state.whiteList.includes(path)) { if (!store.state.whiteList.includes(path)) {
store.commit("setUserInfo", null);
store.commit("setMenu", null);
window.location.href = `/so/manage/ui/#/login`; window.location.href = `/so/manage/ui/#/login`;
} }
// router.replace({ // router.replace({
......
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