import request from '@/utils/request'

// 分页查询客户经纪列表
export function pageListBroker(query) {
  return request({
    url: '/user/broker/pageList',
    method: 'get',
    params: query
  })
}

// 查询客户经纪列表
export function listBroker(query) {
  return request({
    url: '/user/broker/list',
    method: 'get',
    params: query
  })
}

// 查询客户经纪详细
export function getBroker(id) {
  return request({
    url: '/user/broker/' + id,
    method: 'get'
  })
}

// 新增客户经纪
export function addBroker(data) {
  return request({
    url: '/user/broker',
    method: 'post',
    data: data
  })
}

// 修改客户经纪
export function updateBroker(data) {
  return request({
    url: '/user/broker',
    method: 'put',
    data: data
  })
}

// 删除客户经纪
export function delBroker(id) {
  return request({
    url: '/user/broker/' + id,
    method: 'delete'
  })
}

// 导出客户经纪
export function exportBroker(query) {
  return request({
    url: '/user/broker/' + 'export',
    method: 'post',
    params: query
  })
}
