import request from '@/utils/request'

// 创建广告弹窗
export function createBannerPop(data) {
  return request({
    url: '/ecw/banner-pop/create',
    method: 'post',
    data: data
  })
}

// 更新广告弹窗
export function updateBannerPop(data) {
  return request({
    url: '/ecw/banner-pop/update',
    method: 'put',
    data: data
  })
}

// 删除广告弹窗
export function deleteBannerPop(id) {
  return request({
    url: '/ecw/banner-pop/delete?id=' + id,
    method: 'delete'
  })
}

// 获得广告弹窗
export function getBannerPop(id) {
  return request({
    url: '/ecw/banner-pop/get?id=' + id,
    method: 'get'
  })
}

// 获得广告弹窗分页
export function getBannerPopPage(query) {
  return request({
    url: '/ecw/banner-pop/page',
    method: 'get',
    params: query
  })
}

// 导出广告弹窗 Excel
export function exportBannerPopExcel(query) {
  return request({
    url: '/ecw/banner-pop/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
