|
@@ -62,21 +62,33 @@ router.beforeEach(async(to, from, next) => {
|
|
|
router.addRoute(item)
|
|
|
})
|
|
|
|
|
|
- if (accessRoutes[1].path != '/') {
|
|
|
+ console.log('accessRoutes')
|
|
|
+ console.log(accessRoutes)
|
|
|
|
|
|
- next('/middle')
|
|
|
- // next(accessRoutes[1].path)
|
|
|
|
|
|
- } else {
|
|
|
- // router.push({
|
|
|
- // path: '/middle'
|
|
|
- // })
|
|
|
+ console.log('store.state.middleStatus')
|
|
|
+ console.log(store.state.middleStatus)
|
|
|
|
|
|
+ if (store.state.middleStatus == 1) {
|
|
|
next('/middle')
|
|
|
+ } else {
|
|
|
+ next(accessRoutes[0].children[0].path)
|
|
|
+ }
|
|
|
|
|
|
- // next({...to, replace: true })
|
|
|
+ // if (accessRoutes[1].path != '/') {
|
|
|
|
|
|
- }
|
|
|
+ // next('/middle')
|
|
|
+ // // next(accessRoutes[0].children.path)
|
|
|
+ // } else {
|
|
|
+ // // router.push({
|
|
|
+ // // path: '/middle'
|
|
|
+ // // })
|
|
|
+
|
|
|
+ // next('/middle')
|
|
|
+
|
|
|
+ // // next({...to, replace: true })
|
|
|
+
|
|
|
+ // }
|
|
|
|
|
|
} catch {
|
|
|
await store.dispatch('user/resetAll')
|