fix store

This commit is contained in:
jxxghp
2024-06-20 07:08:47 +08:00
parent aa2fe9740c
commit a815e07cdd
4 changed files with 9 additions and 28 deletions

View File

@@ -25,9 +25,7 @@ const progressDialog = ref(false)
// 执行注销操作
function logout() {
// 清除登录状态信息
store.dispatch('auth/clearToken')
// 主动登出时清除路由标记
store.state.auth.originalPath = null
store.dispatch('auth/logout')
// 重定向到登录页面或其他适当的页面
router.push('/login')
}