更新退出登录

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";
});
const logout = () => {
store.dispatch("user/logout");
window.opener = null;
window.open('', '_self');
window.close();
store.commit("app/clearTag", null, { immediate: true });
store.commit("permission/deleteRouter", { immediate: true });
store.commit("user/deleteKeepLiiveRoute", "home");

View File

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

View File

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