import request from '@/utils/request'

/**
 * 获取优惠券列表
 * @returns
 */
export function getTbShopCoupon(params) {
  return request({
    url: '/api/tbShopCoupon',
    method: 'get',
    params: {
      ...params
    }
  })
}

/**
 * 获取优惠券详情
 * @returns
 */
export function getTbShopCouponInfo(id) {
  return request({
    url: '/api/tbShopCoupon/' + id,
    method: 'get',
    params: {}
  })
}

/**
 * 增加优惠券
 * @returns
 */
export function addTbShopCoupon(params) {
  return request({
    url: '/api/tbShopCoupon',
    method: 'post',
    data: {
      ...params
    }
  })
}

/**
 * 删除优惠券
 * @returns
 */
export function delTbShopCoupon(params) {
  return request({
    url: '/api/tbShopCoupon',
    method: 'delete',
    data: params
  })
}

/**
 * 获取领取列表
 * @returns
 */
export function queryReceive(params) {
  return request({
    url: '/api/tbShopCoupon/queryReceive',
    method: 'post',
    data: {
      ...params
    }
  })
}

/**
 * 获取领取列表
 * @returns
 */
export function delReceive(params) {
  return request({
    url: '/api/tbShopCoupon/receive',
    method: 'delete',
    data: params
  })
}
