This commit is contained in:
mrzhou 2024-08-29 00:13:54 +08:00
parent ef56fd2457
commit e378b3b63b

View File

@ -241,7 +241,12 @@ export default {
// //
this.tabLsit(); this.tabLsit();
this.getWebBaseInfo(); this.getWebBaseInfo();
//
window.addEventListener('beforeunload', this.handleBeforeUnload);
},
beforeDestroy() {
//
window.removeEventListener('beforeunload', this.handleBeforeUnload);
}, },
methods:{ methods:{
@ -347,6 +352,11 @@ export default {
location.href = '/index'; location.href = '/index';
}) })
}).catch(() => {}); }).catch(() => {});
},
//
handleBeforeUnload() {
// localStorageisLoggedIn
localStorage.removeItem('isLoggedIn');
}, },
tabClick(url,id,index){ tabClick(url,id,index){
this.tabindex = index this.tabindex = index