Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: bug 修复鉴权时GetInfo与Logout双双失效导致路由死循环
在src/permission.js鉴权时有以下流程: 1 store 2 .dispatch('GetInfo') 3 .catch(()=>{ 4 store.dispatch('Logout').then(()=>{ 5 next({ path: loginRoutePath, query: { redirect: to.fullPath } }) 6 }) 7 }) 2行GetInfo的失败catch会执行触发store的Logout(4行),而Logout也失败不catch会直接resolve导致路由到loginRoutePath(5行), loginRoutePath会再次加载src/permission.js运行store.dispatch('GetInfo'),从此死循环开始。。。
- Loading branch information