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

/**
 * 新客立减
 * @returns
 */
export function getDiscountByUserId(params) {
  return request({
    url: marketUrl + `/admin/consumeDiscount/getDiscountByUserId`,
    method: "get",
    params: {
      ...params,
    },
  });
}

export function getConfig(params) {
  return request({
    url: marketUrl + `/admin/consumeDiscount`,
    method: "get",
    params: {
      ...params,
    },
  });
}

export function editConfig(params) {
  return request({
    url: marketUrl + `/admin/consumeDiscount`,
    method: "POST",
    params: {
      ...params,
    },
  });
}

