diff --git a/src/api/role.js b/src/api/role.js index 9b76539..573f948 100644 --- a/src/api/role.js +++ b/src/api/role.js @@ -56,17 +56,14 @@ }) } -// 功能授权 +// 功能授权, 改为body export function funcAuthor(roleId, ids) { return request({ - url: 'role/funcAuthor', + url: 'role/funcAuthorJson', method: 'post', - params: { + data: { roleId: roleId, ids: ids - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) } }) } diff --git a/src/api/role.js b/src/api/role.js index 9b76539..573f948 100644 --- a/src/api/role.js +++ b/src/api/role.js @@ -56,17 +56,14 @@ }) } -// 功能授权 +// 功能授权, 改为body export function funcAuthor(roleId, ids) { return request({ - url: 'role/funcAuthor', + url: 'role/funcAuthorJson', method: 'post', - params: { + data: { roleId: roleId, ids: ids - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) } }) } diff --git a/src/permission.js b/src/permission.js index 669bb65..9a9ce2a 100644 --- a/src/permission.js +++ b/src/permission.js @@ -35,7 +35,7 @@ store.dispatch('GetMenus', currentSys).then(() => { store.commit('SET_CHANGEFLAG', '0') router.addRoutes(store.getters.addRouters) // 动态添加可访问路由表 - // TODO: 判断路由是否被允许,不允许则重定向 + // 判断路由是否被允许,不允许则重定向 next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record }) } else { // 没有当前子系统信息,跳转到选择子系统页面