import request from "@/utils/request";

export function memberImportMemberList(params) {
  return request({
    url: "/member/import/member/list",
    method: "post",
    params,
  });
}

// 获取会员列表
export function getMemberList(params) {
  return request({
    url: "/member/list/page",
    method: "get",
    params,
  });
}
export function memberApplyPage(params) {
  return request({
    url: "/member/apply/page",
    method: "get",
    params,
  });
}

// 获取会员详情
export function getMemberDetail(params) {
  return request({
    url: "/member/detail",
    method: "get",
    params,
  });
}

export function memberChangeServiceUser(params) {
  return request({
    url: "/member/change/service/user",
    method: "post",
    params,
  });
}
export function memberExamineApply(params) {
  return request({
    url: "/member/examine/apply",
    method: "post",
    params,
  });
}

// 更改会员状态
export function changeMemberStatus(params) {
  return request({
    url: "/member/status/update",
    method: "post",
    params,
  });
}

// 更改团长状态
export function changeHeadStatus(params) {
  return request({
    url: "/member/groupleader",
    method: "post",
    params,
  });
}

// 修改会员
export function updateMember(params) {
  return request({
    url: "/member/update",
    method: "post",
    data: params,
  });
}

// 获取会员地址列表
export function getMemberAddressList(params) {
  return request({
    url: "/member/address",
    method: "get",
    params,
  });
}

// 获取会员收藏列表
export function getMemberFavoriteList(params) {
  return request({
    url: "/member/favorite",
    method: "get",
    params,
  });
}

// 获取会员优惠券列表
export function getMemberCouponList(params) {
  return request({
    url: "/member/coupon",
    method: "get",
    params,
  });
}

// 获取会员浏览记录列表
export function getMemberBrowseList(params) {
  return request({
    url: "/member/goods/visit",
    method: "get",
    params,
  });
}

// 获取会员账户明细列表
export function getMemberAccountList(params) {
  return request({
    url: "/order/share/list",
    method: "get",
    params,
  });
}

// 获取企业微信客户列表
export function getMemberCustomerList(params) {
  return request({
    url: "/member/wx/list",
    method: "get",
    params,
  });
}

// 成为业务员
export function applyWorker(params) {
  return request({
    url: "/manual/assign/worker",
    method: "post",
    params,
  });
}

export function getWebsiteList(params) {
  return request({
    url: "/websit/list",
    method: "get",
    params,
  });
}

export function getShareList(params) {
  return request({
    url: "/coupon/userCouponDetail/query",
    method: "get",
    params,
  });
}

// 修改会员昵称
export function editNickname(params) {
  return request({
    url: "/member/updateNickName",
    method: "post",
    params,
  });
}

// 更改内部人员状态
export function changeInternalPersonnelStatus(params) {
  return request({
    url: "/member/updateUserInnerStatus",
    method: "post",
    params,
  });
}

// // 内部人员批量设置模板
// export function handleDownload(params) {
//   return request({
//     url: '/member/downLoadUserInnerTimplate',
//     method: 'get',
//     params
//   })
// }

// // 导入跟新内部人员状态
// export function handleInternalPersonnel(params) {
//   return request({
//     url: '/member/localUpdateInner',
//     method: 'post',
//     params
//   })
// }

// 获取优惠设置列表
export function getDiscountList(params) {
  return request({
    url: "/promotion/apply/list",
    method: "get",
    params,
  });
}

// 获取优惠设置详情
export function getDiscountDetail(params) {
  return request({
    url: "/promotion/apply/detail",
    method: "get",
    params,
  });
}

// 删除优惠设置
export function deleteDiscount(params) {
  return request({
    url: "/promotion/apply/delete",
    method: "post",
    params,
  });
}

// 修改优惠设置
export function saveDiscount(params) {
  return request({
    url: "/promotion/apply/save",
    method: "post",
    params,
  });
}
