import request from "@/utils/request";

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

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

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

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

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

export function GetRoleList() {
    return request({
        url: "/sys/role/list",
        method: "post",
        data: {page: 1, limit: 1000}
    });
}

//重新生成秘钥
export function generateSecret(query) {
    return request({
        url: "/sys/user/generateSecret",
        method: "get",
        params: query
    })
}
