import { request } from 'umi';

/** 获取优惠卷  sdsa GET /kitchen/api/coupon/couponrecordpage */
export async function GetCouponList(data) {
  return request(`/kitchen/api/coupon/couponrecordpage`, {
    method: 'POST',
    data: data,
    // params: { ...params },
    // ...(options || {}),
  });
}

//获取领取详情
export async function getCustomerCouponList(data) {
  return request(`/kitchen/api/coupon/customerpage`, {
    method: 'POST',
    data: data,
    // params: { ...params },
    // ...(options || {}),
  });
}

export function RecallCoupon(data) {
  return request(`/kitchen/api/coupon/recallcoupon`, {
    method: 'post',
    data: data
  });
}
export function GetCouponRecordById(data) {
  return request(`/kitchen/api/coupon/couponrecordbyid`, {
    method: 'post',
    data: data
  });
}

//获取优惠券适用商品商品
export function GetCouponRecordGoods(data) {
  return request(`/kitchen/api/coupon/couponrecordgoods`, {
    method: 'post',
    data: data
  });
}

//招回商品已发券
export function RecallCouponGoods(data) {
  return request(`/kitchen/api/coupon/recallcoupongoods`, {
    method: 'post',
    data: data
  });
}

//发送优惠卷 /kitchen/api/coupon/receivecouponbyinput
export async function SendCouponByUser(data) {
  return request(`/kitchen/api/coupon/receivecouponbyinput`, {
    method: 'PUT',
    data: data,
    // params: { ...params },
    // ...(options || {}),
  });
}
  //获取用户信息
  export async function GetCustomerInfo(data) {
    return request(`/kitchen​/api​/select​/customerinfo​`, {
      method: 'Post',
      data: data,
      // params: { ...params },
      // ...(options || {}),
    });
  }
