Compare commits
2 Commits
c2d2f5b6d8
...
e794314496
Author | SHA1 | Date | |
---|---|---|---|
e794314496 | |||
1c4744d38d |
30
src/api/roleManagement.ts
Normal file
30
src/api/roleManagement.ts
Normal file
|
@ -0,0 +1,30 @@
|
|||
import { post } from '@/utils/request'
|
||||
|
||||
export function getList(data) {
|
||||
return post('/api/role/queryRoleByPage', data)
|
||||
}
|
||||
|
||||
export function doAdd(data) {
|
||||
return post('/api/role/create', data)
|
||||
}
|
||||
export function doUpdate(data) {
|
||||
return post('/api/role/update', data)
|
||||
}
|
||||
|
||||
export function doDelete(data) {
|
||||
return post('/api/role/destroy', data)
|
||||
}
|
||||
/**
|
||||
* 获取角色列表
|
||||
* @return {Promise<AxiosResponse<{id: number, type:string, roleName: string}[]>>}
|
||||
*/
|
||||
export function getRoleList() {
|
||||
return post('/api/role/list')
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据用户ID获取角色ID
|
||||
*/
|
||||
export function getRoleByUserId(userId) {
|
||||
return post('/api/userRole/getByUserId', { userId })
|
||||
}
|
Loading…
Reference in New Issue
Block a user