refactor permission

This commit is contained in:
Pan
2019-03-21 10:58:44 +08:00
parent e1d61898ed
commit 0c6e45e9a1
6 changed files with 83 additions and 71 deletions

View File

@@ -79,8 +79,7 @@ export default {
},
async logout() {
await this.$store.dispatch('user/logout')
// In order to re-instantiate the vue-router object to avoid bugs
location.reload()
this.$router.push(`/login?redirect=${this.$route.fullPath}`)
}
}
}