import request from '@/utils/request'

// 查询列表
export function getCouponList(urlParams, data) {
  return request({
    url: '/api/v1/mp/admin/coupon/pkg/list',
    method: 'post',
    data,
    urlParams
  })
}

// 删除券包
export function delCoupon(id) {
  return request({
    url: `/api/v1/mp/admin/coupon/pkg/delete/${id}`,
    method: 'post'
  })
}

// 上架下架
export function setCouponPkgStatus(data) {
  return request({
    url: '/api/v1/mp/admin/coupon/pkg/status',
    method: 'post',
    data
  })
}

// 创建券包
export function couponPkgCreate(data) {
  return request({
    url: '/api/v1/mp/admin/coupon/pkg/create',
    method: 'post',
    data
  })
}

// 修改券包
export function couponPkgUpdate(data) {
  return request({
    url: '/api/v1/mp/admin/coupon/pkg/update',
    method: 'post',
    data
  })
}

// 券包详情
export function couponPkgDetail(orderId) {
  return request({
    url: `/api/v1/mp/admin/coupon/pkg/detail/${ orderId }`,
    method: 'post',
  })
}