import request from '@/utils/request'

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

// 获取客户数据
export function getCusUser (phone) {
  return request({
    url: 'api/vipinfo/getlistbypage',
    method: 'get',
    params: {
      phone
    }
  })
}

// 获取来电归属地数据
export function getPhoneLocation (tel) {
  return request({
    url: 'api/CallFunction/GetTelLocation',
    method: 'post',
    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
    }
  })
}
