import request from '@/utils/request'

// 查询广告列表
export function listAdv(query) {
  return request({
    url: '/his/adv/list',
    method: 'get',
    params: query
  })
}

// 查询广告详细
export function getAdv(advId) {
  return request({
    url: '/his/adv/' + advId,
    method: 'get'
  })
}

// 新增广告
export function addAdv(data) {
  return request({
    url: '/his/adv',
    method: 'post',
    data: data
  })
}

// 修改广告
export function updateAdv(data) {
  return request({
    url: '/his/adv',
    method: 'put',
    data: data
  })
}

// 删除广告
export function delAdv(advId) {
  return request({
    url: '/his/adv/' + advId,
    method: 'delete'
  })
}

// 导出广告
export function exportAdv(query) {
  return request({
    url: '/his/adv/export',
    method: 'get',
    params: query
  })
}