import http from "@/http/http.js";
const request = http.request;
const urlType = "market";

export function chatCouponCreate(data) {
  return request({
    url: urlType + `/admin/chat/coupon/create`,
    method: "post",
    data: {
      ...data,
    },
  });
}

export function chatCouponPage(params) {
  return request({
    url: urlType + `/admin/chat/coupon/page`,
    method: "get",
    params: {
      ...params,
    },
  });
}
export function chatCouponExpired(id) {
  return request({
    url: urlType + `/admin/chat/coupon/expired/${id}`,
    method: "delete",
  });
}

export function chatCouponGrant(data) {
  return request({
    url: urlType + `/admin/chat/coupon/grant`,
    method: "post",
    data,
  });
}

export function chatCouponRecord(params) {
  return request({
    url: urlType + `/admin/chat/coupon/record`,
    method: "get",
    params,
  });
}

export function deleteRecord(params) {
  return request({
    url: urlType + `/admin/coupon/deleteRecord?id=`+params.id,
    method: "delete",
    params,
  });
}


