import request from '@/utils/request'

// 查询会员优惠券列表
export function listUserCoupon(query) {
  return request({
    url: '/store/userCoupon/list',
    method: 'get',
    params: query
  })
}
export function getListUserCoupon(query) {
  return request({
    url: '/store/userCoupon/getList',
    method: 'get',
    params: query
  })
}
// 查询会员优惠券详细
export function getUserCoupon(id) {
  return request({
    url: '/store/userCoupon/' + id,
    method: 'get'
  })
}

// 新增会员优惠券
export function addUserCoupon(data) {
  return request({
    url: '/store/userCoupon',
    method: 'post',
    data: data
  })
}
export function sendCoupon(data) {
  return request({
    url: '/store/userCoupon/sendCoupon',
    method: 'post',
    data: data
  })
}

// 修改会员优惠券
export function updateUserCoupon(data) {
  return request({
    url: '/store/userCoupon',
    method: 'put',
    data: data
  })
}

// 删除会员优惠券
export function delUserCoupon(id) {
  return request({
    url: '/store/userCoupon/' + id,
    method: 'delete'
  })
}

// 导出会员优惠券
export function exportUserCoupon(query) {
  return request({
    url: '/store/userCoupon/export',
    method: 'get',
    params: query
  })
}
