mirror of https://github.com/halo-dev/halo-admin
Complete logout procedure
parent
2158c12bff
commit
b65f545b92
|
@ -80,7 +80,7 @@ export default {
|
|||
this.loadOptions()
|
||||
},
|
||||
methods: {
|
||||
...mapActions(['Logout']),
|
||||
...mapActions(['logout']),
|
||||
...mapGetters(['nickname']),
|
||||
handleLogout() {
|
||||
const that = this
|
||||
|
@ -90,7 +90,7 @@ export default {
|
|||
content: '真的要注销登录吗 ?',
|
||||
onOk() {
|
||||
return that
|
||||
.Logout({})
|
||||
.logout({})
|
||||
.then(() => {
|
||||
window.location.reload()
|
||||
})
|
||||
|
|
|
@ -21,6 +21,7 @@ router.beforeEach((to, from, next) => {
|
|||
// TODO Get installation status
|
||||
|
||||
next()
|
||||
NProgress.done()
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -28,12 +29,10 @@ router.beforeEach((to, from, next) => {
|
|||
// Check whitelist
|
||||
if (whiteList.includes(to.name)) {
|
||||
next()
|
||||
NProgress.done()
|
||||
return
|
||||
}
|
||||
|
||||
next({ name: 'Login', query: { redirect: to.fullPath } })
|
||||
})
|
||||
|
||||
router.afterEach(() => {
|
||||
NProgress.done()
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue