优化代码

This commit is contained in:
RuoYi
2026-06-10 19:09:08 +08:00
parent 87d02b0e41
commit 1a8d111459
15 changed files with 70 additions and 67 deletions

View File

@@ -44,11 +44,11 @@ router.beforeEach((to, from, next) => {
next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
})
}).catch(err => {
store.dispatch('LogOut').then(() => {
Message.error(err)
next({ path: '/' })
})
store.dispatch('LogOut').then(() => {
Message.error(err)
next({ path: '/' })
})
})
} else {
next()
}