|
|
@ -73,15 +73,16 @@ router.beforeEach(async (to, from, next) => { |
|
|
|
await store.dispatch('user/getUserInfo',_username).then(()=>{ |
|
|
|
console.log("-------用户信息获取成功-------") |
|
|
|
localStorage.setItem('alreadyTryLogin',true) |
|
|
|
next({ |
|
|
|
...to, |
|
|
|
query:{ |
|
|
|
loginName:to.query.loginName, |
|
|
|
isAutoLogin:to.query.isAutoLogin, |
|
|
|
isSinglePage:to.query.isSinglePage |
|
|
|
}, |
|
|
|
replace: true |
|
|
|
}) |
|
|
|
next(to) |
|
|
|
// next({
|
|
|
|
// ...to,
|
|
|
|
// query:{
|
|
|
|
// loginName:to.query.loginName,
|
|
|
|
// isAutoLogin:to.query.isAutoLogin,
|
|
|
|
// isSinglePage:to.query.isSinglePage
|
|
|
|
// },
|
|
|
|
// replace: true
|
|
|
|
// })
|
|
|
|
}).catch(()=>{ |
|
|
|
localStorage.setItem('alreadyTryLogin',true) |
|
|
|
next() |
|
|
|