import request from '@/utils/request'

// 查询通告券列表
export function listCoupon(query) {
  return request({
    url: '/base/coupon/list',
    method: 'get',
    params: query
  })
}

// 查询通告券详细
export function getCoupon(id) {
  return request({
    url: '/base/coupon/' + id,
    method: 'get'
  })
}

// 新增通告券
export function addCoupon(data) {
  return request({
    url: '/base/coupon',
    method: 'post',
    data: data
  })
}

// 修改通告券
export function updateCoupon(data) {
  return request({
    url: '/base/coupon',
    method: 'put',
    data: data
  })
}

// 删除通告券
export function delCoupon(id) {
  return request({
    url: '/base/coupon/' + id,
    method: 'delete'
  })
}
