|
@@ -80,8 +80,8 @@ router.beforeEach((to, from, next) => {
|
|
|
if (store.getters.roles.length === 0) {
|
|
|
store.dispatch('GetUserInfo').then(res => {
|
|
|
store.dispatch('GetUserMenus').then(res => {
|
|
|
-
|
|
|
- const roles = myRoles;
|
|
|
+ const roles = res.data.data
|
|
|
+
|
|
|
store.dispatch('GenerateRoutes', { roles }).then(() => {
|
|
|
router.addRoutes(store.getters.addRouters)
|
|
|
next({ ...to, replace: true })
|