import createAxios from '@/utils/request'

export function getFunctionsByRoleIndex(data) {
    return createAxios({
        url: '/user-boot/roleFunction/getFunctionsByRoleIndex',
        method: 'post',
        params: data
    })
}

export function updateRoleMenu(data: any) {
    return createAxios({
        url: '/user-boot/function/assignFunctionByRoleIndexes',
        method: 'post',
        data: data
    })
}
// 新增角色与系统关系
export function systemAdd(data: any) {
    return createAxios({
        url: '/user-boot/sysRoleSystem/add',
        method: 'post',
        data: data
    })
}
// 根据角色id获取系统信息
export function getSystemByRoleId(params: any) {
    return createAxios({
        url: '/user-boot/sysRoleSystem/getSystemByRoleId',
        method: 'get',
        params
    })
}
