import request from '@/utils/request'



// 查询优惠券可使用衣物列表
export function listCouponTypeApplyCloth(query) {
  return request({
    url: '/mapi/app/couponTypeApplyCloth/list',
    method: 'get',
    params: query
  })
}

// 查询优惠券可使用衣物详细
export function getCouponTypeApplyCloth(id) {
  return request({
    url: '/mapi/app/couponTypeApplyCloth/' + id,
    method: 'get'
  })
}

// 新增优惠券可使用衣物
export function addCouponTypeApplyCloth(data) {
  return request({
    url: '/mapi/app/couponTypeApplyCloth',
    method: 'post',
    data: data
  })
}

// 修改优惠券可使用衣物
export function updateCouponTypeApplyCloth(data) {
  return request({
    url: '/mapi/app/couponTypeApplyCloth',
    method: 'put',
    data: data
  })
}

// 删除优惠券可使用衣物
export function delCouponTypeApplyCloth(id) {
  return request({
    url: '/mapi/app/couponTypeApplyCloth/' + id,
    method: 'delete'
  })
}


// 修改优惠券可使用衣物状态
export function updateCouponTypeApplyClothStatus(id,status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/mapi/app/couponTypeApplyCloth/updateStatus',
    method: 'post',
    data: data
  })
}
