src/layout/components/Navbar.vue
@@ -107,7 +107,8 @@ }, async logout() { // await this.$store.dispatch('user/logout') localStorage.removeItem("user") sessionStorage.removeItem("user") localStorage.removeItem("autoenter"); this.$router.push(`/login?redirect=${this.$route.fullPath}`) this.$router.replace({path: '/login'}); location.reload(); @@ -115,7 +116,7 @@ getUser(){ get(this.$url.info).then(res=>{ this.user = res.data localStorage.setItem("user",JSON.stringify(res.data)) sessionStorage.setItem("user",JSON.stringify(res.data)) }) } }