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

export function enable(params) {
  return request({
    url: urlType + `/admin/rechargeRedemption/enable`,
    method: "PUT",
    params: {
      ...params,
    },
  });
}

export function status(params) {
  return request({
    url: urlType + `/admin/rechargeRedemption/enable/status`,
    method: "get",
    params: {
      ...params,
    },
  });
}
export function couponRedemption(params) {
  return request({
    url: urlType + `/admin/rechargeRedemption`,
    method: "get",
    params: {
      ...params,
    },
  });
}
export function couponRedemptionList(params) {
  return request({
    url: urlType + `/admin/rechargeRedemption/list`,
    method: "get",
    params: {
      ...params,
    },
  });
}
export function add(params) {
  return request({
    url: urlType + `/admin/rechargeRedemption`,
    method: "POST",
    params: {
      ...params,
    },
  });
}
export function edit(params) {
  return request({
    url: urlType + `/admin/rechargeRedemption`,
    method: "PUT",
    params: {
      ...params,
    },
  });
}
export function codeList(params) {
  return request({
    url: urlType + `/admin/rechargeRedemption/code/list`,
    method: "GET",
    params: {
      ...params,
    },
  });
}
export function codeExport(params) {
  return http.download({
    url: urlType + `/admin/rechargeRedemption/code/export`,
    method: "GET",
    params: {
      ...params,
    },
  });
}
