|
|
@ -71,6 +71,7 @@ router.beforeEach(async (to, from, next) => { |
|
|
|
// }
|
|
|
|
// // store.dispatch('user/login', loginForm).then(() => {
|
|
|
|
// login(loginForm).then(()=>{
|
|
|
|
console.log(222222222222,_username) |
|
|
|
await store.dispatch('user/getUserInfo',_username).then(()=>{ |
|
|
|
console.log("-------用户信息获取成功-------") |
|
|
|
localStorage.setItem('alreadyTryLogin',true) |
|
|
@ -98,7 +99,7 @@ router.beforeEach(async (to, from, next) => { |
|
|
|
// })
|
|
|
|
// next(`/login?loginName=${to.query.loginName}&isAutoLogin=${to.query.isAutoLogin}`)
|
|
|
|
// next(`/login`)
|
|
|
|
localStorage.removeItem("isLoginName") |
|
|
|
localStorage.setItem("isLoginName",_username) |
|
|
|
// Message.error('获取用户信息失败,请重试!')
|
|
|
|
}) |
|
|
|
// })
|
|
|
|