更新退出登录

This commit is contained in:
2025-07-28 10:04:49 +08:00
parent 1c3a25f527
commit b3b30026c9
3 changed files with 10 additions and 8 deletions

View File

@ -56,7 +56,9 @@ onMounted(() => {
active.value = "LZ"; active.value = "LZ";
}); });
const logout = () => { const logout = () => {
store.dispatch("user/logout"); window.opener = null;
window.open('', '_self');
window.close();
store.commit("app/clearTag", null, { immediate: true }); store.commit("app/clearTag", null, { immediate: true });
store.commit("permission/deleteRouter", { immediate: true }); store.commit("permission/deleteRouter", { immediate: true });
store.commit("user/deleteKeepLiiveRoute", "home"); store.commit("user/deleteKeepLiiveRoute", "home");

View File

@ -28,13 +28,12 @@ const updatePwd = () => {
const store = useStore(); const store = useStore();
const logout = () => { const logout = () => {
store.dispatch("user/logout"); window.opener = null;
store.commit("app/clearTag", null, { window.open('', '_self');
immediate: true window.close();
}); store.commit("app/clearTag", null, { immediate: true });
store.commit("permission/deleteRouter", { store.commit("permission/deleteRouter", { immediate: true });
immediate: true store.commit("user/deleteKeepLiiveRoute", "home");
});
}; };
</script> </script>

View File

@ -178,6 +178,7 @@ const handleBtns = (val) => {
window.close(); window.close();
store.commit("app/clearTag", null, { immediate: true }); store.commit("app/clearTag", null, { immediate: true });
store.commit("permission/deleteRouter", { immediate: true }); store.commit("permission/deleteRouter", { immediate: true });
store.commit("user/deleteKeepLiiveRoute", "home");
break; break;
} }
}; };