import request from '@/utils/request'

// 分页查询业务线索列表
export function pageListClue(query) {
  return request({
    url: '/biz/clue/pageList',
    method: 'get',
    params: query
  })
}

// 查询业务线索列表
export function listClue(query) {
  return request({
    url: '/biz/clue/list',
    method: 'get',
    params: query
  })
}

// 查询业务线索详细
export function getClue(id) {
  return request({
    url: '/biz/clue/' + id,
    method: 'get'
  })
}

// 新增业务线索
export function addClue(data) {
  return request({
    url: '/biz/clue',
    method: 'post',
    data: data
  })
}

// 修改业务线索
export function updateClue(data) {
  return request({
    url: '/biz/clue',
    method: 'put',
    data: data
  })
}

// 删除业务线索
export function delClue(id) {
  return request({
    url: '/biz/clue/' + id,
    method: 'delete'
  })
}

// 导出业务线索
export function exportClue(query) {
  return request({
    url: '/biz/clue/' + 'export',
    method: 'post',
    params: query
  })
}


// 分页查询业务线索列表,访客归类
export function pageListClueVisitsNum(query) {
  return request({
    url: '/biz/clue/getVisitsNum',
    method: 'get',
    params: query
  })
}

// 修改访客的经纪人
export function clueChangeUserId(data) {
  return request({
    url: '/biz/clue/changeUserId',
    method: 'post',
    data: data
  })
}