import request, { postBlob, getBlob, handleImport } from '@/utils/request'

// 获取列表
export function getList(params) {
  return request({
    url: '/promotion/luck/draw/list',
    method: 'get',
    params
  })
}

// 新增数据
export function addData(params) {
  return request({
    url: '/promotion/luck/draw/add',
    method: 'post',
    data: params
  })
}

// 获取详情
export function getDetail(params) {
  return request({
    url: '/promotion/luck/draw/detail',
    method: 'get',
    params
  })
}

// 更改状态
export function changeStatus(params) {
  return request({
    url: '/promotion/luck/draw/updateStatus',
    method: 'post',
    params
  })
}

// 获取记录
export function getRecords(params) {
  return request({
    url: '/promotion/luck/draw/exchange/list',
    method: 'get',
    params
  })
}



// 新增优惠券
export function addCoupon(params) {
  return request({
    url: '/coupon/add',
    method: 'post',
    data: params
  })
}

// 编辑优惠券
export function editCoupon(params) {
  return request({
    url: '/coupon/update',
    method: 'post',
    data: params
  })
}

// 获取优惠券详情
export function getCouponDetail(params) {
  return request({
    url: '/coupon/detail',
    method: 'get',
    params
  })
}

// 变更优惠券标志
export function changeCouponFlag(params) {
  return request({
    url: '/coupon/change/flag',
    method: 'post',
    params
  })
}

// 获取分类列表
export function getClassifyList(params) {
  return request({
    url: '/goods/category/list',
    method: 'get',
    params
  })
}

// 获取商品列表
export function getGoodsList(params) {
  return request({
    url: '/coupon/list/spec/select',
    method: 'get',
    params
  })
}

// 获取标签列表
export function getTagList(params) {
  return request({
    url: '/tag/list',
    method: 'get',
    params
  })
}

// 获取会员列表
export function getMemberList(params) {
  return request({
    url: '/member/list/page',
    method: 'get',
    params
  })
}

// 补发业务员优惠券
export function reissueCoupon(params) {
  return request({
    url: '/coupon/reissue',
    method: 'post',
    data: params
  })
}