import request from "@/utils/request";

export function GetList(param) {
    return request({
        url: "/sys/role/list",
        method: "post",
        data: param
    });
}

export function Insert(param) {
    return request({
        url: "/sys/role/insert",
        method: "post",
        data: param
    });
}

export function Update(param) {
    return request({
        url: "/sys/role/update",
        method: "post",
        data: param
    });
}

export function Detail(id) {
    return request({
        url: "/sys/role/detail",
        method: "post",
        params: {id}
    });
}

export function Delete(id) {
    return request({
        url: "/sys/role/delete",
        method: "post",
        params: {id}
    });
}

export function GetRoleMenu(roleId) {
    return request({
        url: "/sys/role/getRoleMenu",
        method: "post",
        params: {roleId}
    });
}

export function SaveRoleMenu(param) {
    return request({
        url: "/sys/role/saveRoleMenu",
        method: "post",
        data: param
    });
}
