|
@@ -19,10 +19,8 @@ router.beforeEach((to, from, next) => {
|
|
|
} else {
|
|
|
if (store.getters.roles.length === 0) {
|
|
|
|
|
|
- store.dispatch('GetInfo').then(res => {
|
|
|
-
|
|
|
- const roles = res.roles
|
|
|
- store.dispatch('GenerateRoutes', { roles }).then(accessRoutes => {
|
|
|
+ store.dispatch('GetInfo').then(() => {
|
|
|
+ store.dispatch('GenerateRoutes').then(accessRoutes => {
|
|
|
|
|
|
router.addRoutes(accessRoutes)
|
|
|
next({ ...to, replace: true })
|