import request from '@/utils/request'

export function listAd(query) {
  return request({
    url: '/campaign/list',
    method: 'get',
    params: query
  })
}

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

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

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

export function deleteAd(data) {
  return request({
    url: '/campaign/delete',
    method: 'post',
    data
  })
}
