fix(Navbar.vue): 退出路由无法跳转到登录页面问题修复

This commit is contained in:
有来技术 committed 2021-12-02 00:12:22 +08:00
1 parent 3fa3d7ec0c
commit 58d3c0102f
1 file changed
+3 -2
+3 -2
View File
@@ -80,8 +80,9 @@ export default {
store.dispatch('app/toggleSideBar', false)
},
logout: () => {
store.dispatch('user/logout')
router.push(`/login?redirect=${route.fullPath}`)
store.dispatch('user/logout').then(()=>{
router.push(`/login?redirect=${route.fullPath}`)
})
}
})
return {