import request from './fetcher/request'
// 经纪人相关的API
export default {
  
  fetchAgentDetail (agent_user_id) {
    return request.get('agency/detail', {
      agency_user_id: agent_user_id
    })
  },
  // 客户详情
  // fetchCustomerDetail ({ agency_user_id, user_id }) {
  fetchCustomerDetail ({ id  }) {
    return request.get('agency/customer/detailxc', { id })
  },
  // 获取客源列表
  fetchCustomers (data) {
    return request.get('agency/customer/list', data)
  },

   // 根据手机号获取客源
   fetchUserByPhone (data) {
    return request.get('user/getByPhone', data)
  },

  // 增加客源
  addCustomer (data) {
    return request.post('agency/add/customer', data)
  },
  // 搜索客源列表
  searchCustomers (data) {
    return request.get('agency/customer/query', data)
  },

  // 修改客源详情
  updateCustomer (data) {
    return request.post('agency/update/customer', data)
  }
}