import request from '@/utils/request'

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

// 查询广告详细
export function getAd(adId) {
  return request({
    url: '/ss/ad/' + adId,
    method: 'get'
  })
}

// 新增广告
export function addAd(data) {
  return request({
    url: '/ss/ad',
    method: 'post',
    data: data
  })
}

// 修改广告
export function updateAd(data) {
  return request({
    url: '/ss/ad',
    method: 'put',
    data: data
  })
}

// 删除广告
export function delAd(adId) {
  return request({
    url: '/ss/ad/' + adId,
    method: 'delete'
  })
}
