import request from '@/apps/mobile/utils/request'

// 用户规则设置 分页获取
export function queryPage(data) {
    return request({
        method: 'post',
        url: '/api/userLevelRules/query-page',
        data,
    });
}

// 新增
export function addData(data) {
    return request({
        method: 'post',
        url: '/api/userLevelRules/insert',
        data,
    });
}

// 删除
export function removeData(data) {
    return request({
        method: 'delete',
        url: '/api/userLevelRules/delete-batch',
        data,
    });
}

// 编辑
export function editData(data) {
    return request({
        method: 'put',
        url: '/api/userLevelRules/update',
        data,
    });
}


// 审批
export function examine(data) {
    return request({
        method: 'post',
        url: `/api/userLevelRules/examine`,
        data
    });
}

// 查询还没有设置返利的角色
export function getRole() {
    return request({
        method: 'post',
        url: `/api/userLevelRules/getRole`,
    });
}



// 用户规则批量删除+逻辑判断
export function deleteRuleData(data) {
    return request({
        method: 'delete',
        url: '/api/userLevelRules/delete-many',
        data,
    });
}
