import request from '@/utils/request'

// 获取代理配置详细信息
export function agentConfigInfo(query) {
    return request({
        url: '/agent/agentConfig/info',
        method: 'get',
        params: query
    })
}

// 新增代理配置
export function agentConfigAdd(data) {
    return request({
        url: '/agent/agentConfig/add',
        method: 'post',
        data
    })
}

// 分页查询代理申请待审核列表
export function agentApplyWaitPage(query) {
    return request({
        url: '/agent/agentApply/waitPage',
        method: 'get',
        params: query
    })
}

// 分页查询代理申请已审核列表
export function agentApplyAuditPage(query) {
    return request({
        url: '/agent/agentApply/auditPage',
        method: 'get',
        params: query
    })
}

// 审核代理申请
export function agentApplyAudit(data) {
    return request({
        url: '/agent/agentApply/audit',
        method: 'post',
        data
    })
}


// 获取代理申请详细信息
export function agentApplyInfo(agentApplyId) {
    return request({
        url: `/agent/agentApply/info/${agentApplyId}`,
        method: 'get',
    })
}

// 所有-查询代理账户码列表
export function agentAccountCodePage(query) {
    return request({
        url: '/agent/agentAccountCode/page',
        method: 'get',
        params: query
    })
}

// 代理下-查询代理账户码列表
export function agentAccountCodeAgentPage(query) {
    return request({
        url: '/agent/agentAccountCode/agentPage',
        method: 'get',
        params: query
    })
}


// 查询代理账户码申请待审核列表
export function agentAccountCodeApplyWaitPage(query) {
    return request({
        url: '/agent/agentAccountCodeApply/waitPage',
        method: 'get',
        params: query
    })
}

// 查询代理账户码申请已审核列表
export function agentAccountCodeApplyAuditPage(query) {
    return request({
        url: '/agent/agentAccountCodeApply/auditPage',
        method: 'get',
        params: query
    })
}

// 获取代理账户码申请详细信息
export function agentAccountCodeApplyInfo(id) {
    return request({
        url: `/agent/agentAccountCodeApply/info/${id}`,
        method: 'get',
    })
}

// 审核代理账户码申请
export function agentAccountCodeApplyAudit(data) {
    return request({
        url: '/agent/agentAccountCodeApply/audit',
        method: 'post',
        data
    })
}