import request from '@/utils/request'
import Qs from 'qs'

export function listCalllog(query) {
  return request({
    url: '/calllog/list',
    method: 'get',
    params: query,
    paramsSerializer: function(params) {
      return Qs.stringify(params, { arrayFormat: 'repeat' })
    }
  })
}

export function createCalllog(data) {
  return request({
    url: '/calllog/create',
    method: 'post',
    data
  })
}

export function readCalllog(data) {
  return request({
    url: '/calllog/read',
    method: 'get',
    data
  })
}

export function updateCalllog(data) {
  return request({
    url: '/calllog/update',
    method: 'post',
    data
  })
}


export function listCampaign() {
  return request({
    url: '/calllog/campaigns',
    method: 'get' 
  })
}
