improve: 标签清理

This commit is contained in:
From-wh 2023-04-20 15:16:58 +08:00
parent f2526ffc69
commit 82d5b315f6
2 changed files with 10 additions and 4 deletions

View File

@ -198,12 +198,15 @@ export default {
instance.confirmButtonLoading = true;
instance.confirmButtonText = this.$t('message.user.logOutExit');
AccountLogout().then((res) => {
this.$Message.success('您已成功退出');
this.$router.replace({ path: `${settings.routePre}/login` });
this.$router.replace({ name: 'login' });
this.$store.commit('clearAll');
localStorage.clear();
sessionStorage.clear();
removeCookies('token');
removeCookies('expires_time');
removeCookies('uuid');
// window.location.reload()
this.$Message.success('您已成功退出');
// this.$router.replace({ path: `${settings.routePre}/login` });
done();
setTimeout(() => {
instance.confirmButtonLoading = false;

View File

@ -77,7 +77,7 @@ export default {
},
addTag(state, { route, type = 'unshift' }) {
let router = getRouteTitleHandled(route);
console.log(router,'routerrouterrouter')
console.log(router, 'routerrouterrouter');
if (!routeHasExist(state.tagNavList, router)) {
if (type === 'push') state.tagNavList.push(router);
else {
@ -97,6 +97,9 @@ export default {
setHasReadErrorLoggerStatus(state, status = true) {
state.hasReadErrorPage = status;
},
clearAll(state) {
state.tagNavList = [];
},
},
actions: {
addErrorLog({ commit, rootState }, info) {