import request from '@/utils/request'

// 获取通讯录
export function getCusUserLists(params) {
  return request({
    url: '',
    method: 'get',
    params
  })
}

// 获取客户数据
export function getCusUser(id) {
  return request({
    url: 'callcenterapi/api/CusUser/getsingle',
    method: 'get',
    params: {
      id
    }
  })
}

// 获取来电归属地数据
export function getPhoneLocation(tel) {
  return request({
    url: 'callcenterapi/api/callinscreen/getphonelocation',
    method: 'get',
    params: {
      tel
    }
  })
}

// 拉黑
export function addBlack(data) {
  return request({
    url: 'callcenterapi/api/callinscreen/addblack',
    method: 'post',
    data
  })
}

// 取消拉黑
export function cancelBlack(phone) {
  return request({
    url: 'callcenterapi/api/callinscreen/delblack',
    method: 'post',
    data: {
      phone
    }
  })
}
