醉梦人间三千年 7 miesięcy temu
rodzic
commit
55747b905b
1 zmienionych plików z 4 dodań i 4 usunięć
  1. 4 4
      src/api/system/role/index.ts

+ 4 - 4
src/api/system/role/index.ts

@@ -29,17 +29,17 @@ export const getSimpleRoleList = async (): Promise<RoleVO[]> => {
 
 // 查询角色详情
 export const getRole = async (id: number) => {
-  return await request.get({ url: '/system/role/get?id=' + id })
+  return await request.get({ url: '/system/role/' + id })
 }
 
 // 新增角色
 export const createRole = async (data: RoleVO) => {
-  return await request.post({ url: '/system/role/create', data })
+  return await request.post({ url: '/system/role', data })
 }
 
 // 修改角色
 export const updateRole = async (data: RoleVO) => {
-  return await request.put({ url: '/system/role/update', data })
+  return await request.put({ url: '/system/role/'+data.id, data })
 }
 
 // 修改角色状态
@@ -49,7 +49,7 @@ export const updateRoleStatus = async (data: UpdateStatusReqVO) => {
 
 // 删除角色
 export const deleteRole = async (id: number) => {
-  return await request.delete({ url: '/system/role/delete?id=' + id })
+  return await request.delete({ url: '/system/role/' + id })
 }
 
 // 导出角色