|
@@ -61,7 +61,9 @@ router.beforeEach((to, from, next) => {
|
|
|
if (localStorage.getItem((import.meta as any).env.VITE_TOKEN)) {
|
|
|
AppStore.initUserInfo()
|
|
|
.then(() => {
|
|
|
- isLogin ? next({ name: 'root' }) : next(to.path)
|
|
|
+ isLogin
|
|
|
+ ? next({ name: 'root' })
|
|
|
+ : next({ path: to.path, query: to.query })
|
|
|
})
|
|
|
.catch((e) => {
|
|
|
localStorage.removeItem((import.meta as any).env.VITE_TOKEN)
|