import request from '@/utils/request'

// 创建跟进
export function createCustomerFollow(data) {
  return request({
    url: '/ecw/customer-follow/create',
    method: 'post',
    data: data
  })
}

// 更新跟进
export function updateCustomerFollow(data) {
  return request({
    url: '/ecw/customer-follow/update',
    method: 'put',
    data: data
  })
}

// 删除跟进
export function deleteCustomerFollow(id) {
  return request({
    url: '/ecw/customer-follow/delete?id=' + id,
    method: 'delete'
  })
}

// 获得跟进
export function getCustomerFollow(id) {
  return request({
    url: '/ecw/customer-follow/get?id=' + id,
    method: 'get'
  })
}

// 获得跟进分页
export function getCustomerFollowPage(query) {
  return request({
    url: '/customer/detail/infoList/followPage',
    method: 'get',
    params: query
  })
}
export function getCustomerFollowPage2(query) {
  return request({
    url: '/ecw/customer-follow/page',
    method: 'get',
    params: query
  })
}

// 导出跟进 Excel
export function exportCustomerFollowExcel(query) {
  return request({
    url: '/ecw/customer-follow/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
