import request from "@/utils/request";

// 获取礼品列表
export function integralList(data) {
  return request({
    url: "/app-api/ecw/reward/list",
    method: "post",
    data,
  });
}

// 获得礼品详情
export function rewardDetails(params) {
  return request({
    url: "/app-api/ecw/reward/get",
    method: "get",
    params,
  });
}

// 获取网点列表
export function getBranchList(params) {
  return request({
    url: "/admin-api/ecw/node/get-node-tree-region",
    method: "get",
    params,
  });
}
// 获取提货点的接口
export function getWarehouseList(params) {
  return request({
    url: "/admin-api/member/score-rule/warehouse-tree-region-list",
    method: "get",
    params,
  });
}
// 获取积分活动列表
export function integralActivityList(data) {
  return request({
    url: "/app-api/member/score-rule/list",
    method: "post",
    data,
  });
}

// 获取会员信息
export function getMemberInfo(data) {
  return request({
    url: `/app-api/member/user-score/info?id=${data.id}`,
    method: "post",
    data,
  });
}

// 获取活动详情
export function integralActivityDetail(data) {
  return request({
    url: "/app-api/member/score-rule/get",
    method: "post",
    data,
  });
}

// 兑换发送验证码
export function exchangeSMSCode(data) {
  return request({
    url: "/app-api/reward/redeem/send-sms-code",
    method: "post",
    data,
  });
}

// 兑换礼品
export function redeemSingleReward(data) {
  return request({
    url: "/app-api/reward/redeem/single",
    method: "post",
    data,
  });
}

// 创建复制记录
export function shareRecordCreate(data) {
  return request({
    url: "/app-api/member/score-rule/share-record/create",
    method: "post",
    data,
  });
}
