import request from '@/utils/request'

// 查询机构代理列表
export function listAgent(query) {
  return request({
    url: '/dz/agent/list',
    method: 'get',
    params: query
  })
}

// 查询机构代理详细
export function getAgent(agentId) {
  return request({
    url: '/dz/agent/' + agentId,
    method: 'get'
  })
}

// 新增机构代理
export function addAgent(data) {
  return request({
    url: '/dz/agent',
    method: 'post',
    data: data
  })
}

// 修改机构代理
export function updateAgent(data) {
  return request({
    url: '/dz/agent',
    method: 'put',
    data: data
  })
}

// 删除机构代理
export function delAgent(agentId) {
  return request({
    url: '/dz/agent/' + agentId,
    method: 'delete'
  })
}
