提交 0279ae8f authored 作者: huaxinzhu's avatar huaxinzhu

Merge branch 'M_2.5_1122' into test

...@@ -34,10 +34,19 @@ router.beforeEach((to, from, next) => { ...@@ -34,10 +34,19 @@ router.beforeEach((to, from, next) => {
store.dispatch('GenerateRoutes', { roles }).then(accessRoutes => { store.dispatch('GenerateRoutes', { roles }).then(accessRoutes => {
// 根据roles权限生成可访问的路由表 // 根据roles权限生成可访问的路由表
router.addRoutes(accessRoutes) router.addRoutes(accessRoutes)
if (userInfo && userInfo.state == 1) { // debugger
if (userInfo.state == 1) {
next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
} else { } else if (userInfo.state == 2){
next({path:'/process',replace: true}); next({path:'/reviewing',replace: true});
} else if (userInfo.state == 0){
if (userInfo.status == 0) {
next({path:'/process',replace: true});
}else if (userInfo.status == 1) {
next({path:'/fillShopInf',replace: true});
}
} else if (userInfo.state == 3) {
next({path:'/reviewFail',replace: true,params: {...to.params.msg}});
} }
}) })
}).catch(err => { }).catch(err => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论