Files
Yi.Admin/Yi.Vue2.x/src/api/roleApi.js

26 lines
629 B
JavaScript
Raw Normal View History

2022-04-26 01:34:47 +08:00
import myaxios from '@/util/myaxios'
import {objctToDic} from '@/util/objctHandle'
2022-04-26 01:34:47 +08:00
export default {
2022-04-29 12:38:19 +08:00
getList() {
2022-04-26 01:34:47 +08:00
return myaxios({
2022-04-29 12:38:19 +08:00
url: '/Role/GetList',
method: 'post',
data: objctToDic()
2022-04-26 01:34:47 +08:00
})
},
2022-04-29 12:38:19 +08:00
giveRoleSetMenu(roleList, menuList) {
2022-04-26 01:34:47 +08:00
return myaxios({
2022-04-29 12:38:19 +08:00
url: '/Role/GiveRoleSetMenu',
method: 'put',
data: { RoleIds: roleList, menuIds: menuList }
2022-04-26 01:34:47 +08:00
})
},
2022-04-29 12:38:19 +08:00
getInMenuByRoleId(roleId) {
2022-04-26 01:34:47 +08:00
return myaxios({
2022-04-29 12:38:19 +08:00
url: `/Role/GetInMenuByRoleId?roleId=${roleId}`,
2022-04-26 01:34:47 +08:00
method: 'get'
})
}
2022-04-26 01:34:47 +08:00
}