import $http from "@/utils/httpRequest.js";

export const coupon = {
  //优惠券列表
  couponList: (data) => {
    return $http.request({
      url: `/merchant-api/coupon/page`,
      method: "get",
      params: data,
    });
  },
  //添加优惠卷
  addCoupon: (data) => {
    return $http.post(`/merchant-api/coupon/save`, data);
  },
  //新增优惠卷数量
  addNumCoupon: (data) => {
    return $http.post(`/merchant-api/coupon/addNum`, data);
  },
  //优惠卷状态
  couponStatus: (data) => {
    return $http.post(`/merchant-api/coupon/update/status`, data);
  },
  //删除优惠卷
  deleteCoupon: (data) => {
    return $http.post(`/merchant-api/coupon/batch/delete`, data);
  },
};
