Files

64 lines
1.2 KiB
JavaScript

import { l as httpRequest } from "./index.CMd5bD1r.js";
const API_PATH = "/system/role";
const RoleAPI = {
listRole(query) {
return httpRequest({
url: `${API_PATH}/list`,
method: "get",
params: query
});
},
detailRole(query) {
return httpRequest({
url: `${API_PATH}/detail/${query}`,
method: "get"
});
},
createRole(body) {
return httpRequest({
url: `${API_PATH}/create`,
method: "post",
data: body
});
},
updateRole(id, body) {
return httpRequest({
url: `${API_PATH}/update/${id}`,
method: "put",
data: body
});
},
deleteRole(body) {
return httpRequest({
url: `${API_PATH}/delete`,
method: "delete",
data: body
});
},
batchRole(body) {
return httpRequest({
url: `${API_PATH}/available/setting`,
method: "patch",
data: body
});
},
setPermission(body) {
return httpRequest({
url: `${API_PATH}/permission/setting`,
method: "patch",
data: body
});
},
exportRole(body) {
return httpRequest({
url: `${API_PATH}/export`,
method: "post",
data: body,
responseType: "blob"
});
}
};
export {
RoleAPI as R
};