import request from '@/utils/request'

// 查询客户线索三方平台列表
export function listThird(query) {
  return request({
    url: '/crm/third/list',
    method: 'get',
    params: query
  })
}

// 查询客户线索三方平台详细
export function getThird(id) {
  return request({
    url: '/crm/third/' + id,
    method: 'get'
  })
}

// 新增客户线索三方平台
export function addThird(data) {
  return request({
    url: '/crm/third',
    method: 'post',
    data: data
  })
}

// 修改客户线索三方平台
export function updateThird(data) {
  return request({
    url: '/crm/third',
    method: 'put',
    data: data
  })
}

// 删除客户线索三方平台
export function delThird(id) {
  return request({
    url: '/crm/third/' + id,
    method: 'delete'
  })
}

// 导出客户线索三方平台
export function exportThird(query) {
  return request({
    url: '/crm/third/export',
    method: 'get',
    params: query
  })
}

// 保存auth令牌
export function saveFeiyuAuth(data) {
  return request({
    url: '/third/feiyu/oauthCallback',
    method: 'post',
    data: data
  })
}


// 获取广告商
export function getAdvertisers(data) {
  return request({
    url: '/third/feiyu/getAdvertisers',
    method: 'post',
    data: data
  })
}


// 获取飞鱼线索客户
export function getClues(data) {
  return request({
    url: '/third/feiyu/getClues',
    method: 'post',
    data: data
  })
}


// 从飞鱼批量导入线索客户
export function importThird(data) {
  return request({
    url: '/third/feiyu/importThird',
    method: 'put',
    data: data
  })
}


