import request from "@/utils/request.js";

/**
 * 智慧充值 配置信息获取
 * @param {*} data
 * @returns
 */
export function shopRecharge(params) {
  return request({
    method: "get",
    url: "/market/admin/shopRecharge",
    params,
  });
}

/**
 * 获取当前可用限时折扣
 * @param {shopId} params 
 * @returns 
 */
export function getLimitTimeDiscount(params) {
  return request({
    method: "get",
    url: "/market/admin/limitTimeDiscount",
    params,
  });
}

/**
 * 获取当前可用的满减活动
 * @param {shopId} params 
 * @returns 
 */
export function getDiscountActivity(params) {
  return request({
    method: "get",
    url: "/market/admin/discountActivity",
    params,
  });
}

/**
 * 根据用户id获取新客立减金额，返回null代表不可用
 * @param {shopId} params 
 * @returns 
 */
export function getDiscountByUserId(params) {
  return request({
    method: "get",
    url: "/market/admin/consumeDiscount/getDiscountByUserId",
    params,
  });
}

