import request from "../utils/request";
import qs from "qs";
let setqs = function (data) {
  return qs.stringify(data);
};
// 获取卡券信息
export function userCardApi (data) {
  return request({
    url: "/yishoudan/usercoupon/list",
    // method: "post",
    data: data,
  });
}
// 获取用户余额信息
export function userBalanceApi (data) {
  return request({
    url: "/yishoudan/wallet/info",
    // method: "post",
    data: data,
  });
}

// 获取用户提现详情
export function userDetailApi (data) {
  return request({
    url: "/yishoudan/wallet/withdrawal/list",
    // method: "post",
    data: data,
  });
}
// // 获取我的老乡信息
// export function userTownsmanApi(data) {
//   return request({
//     url: "/yishoudan/workorder/getLaoXiangList",
//     // method: "post",
//     data: data,
//   });
// }
// 获取我的报名信息
export function userBillApi (data) {
  return request({
    url: "/yishoudan/user/apply/order/list",
    method: "post",
    data: setqs(data),
  });
}
// 获取我的报名状态数量
export function userBillNumberApi (data) {
  return request({
    url: "/yishoudan/user/apply/order/listStatisticsNum",
    // method: "post",
    data: data,
  });
}
// 获取跟进记录详情
export function userBillDetailApi (data) {
  return request({
    url: "/yishoudan/user/apply/order/details?orderId=" + data,
    // method: "post",
  });
}
// 获取用户信息
export function userBaseInfoApi (data) {
  return request({
    url: "/yishoudan/user/getUserInfo",
    // method: "post",
    data: data,
  });
}
// 获取用户积分信息

export function getPointApi (data) {
  return request({
    url: "/yishoudan/wallet/getPoint",
    // method: "post",
    data: data,
  });
}
// 获取用户积分使用信息

export function getPointDetailApi (data) {
  return request({
    url: "/yishoudan/pointUseRecord/list",
    // method: "post",
    data: data,
  });
}
// 登录状态账号设置修改密码

export function setUserPswApi (data) {
  return request({
    url: "/yishoudan/changePassword",
    method: "post",
    data: setqs(data),
  });
}
// 登录状态账号修改绑定手机号

export function setUserTelApi (data) {
  return request({
    url: "/yishoudan/user/changeTel",
    // method: "post",
    data: setqs(data),
  });
}
// 账号修改绑定银行卡

export function getUserBankListApi (data) {
  return request({
    url: "/yishoudan/user/bank/getUserBankList",
    // method: "post",
    data: data,
  });
}
// 实名认证

export function setUserRealNameApi (data) {
  return request({
    url: "/yishoudan/user/realNameAuth",
    // method: "post",
    data: data,
  });
}
// 获取用户微信绑定的二维码
export function getUserWxApi (data) {
  return request({
    url: "/yishoudan/user/getMiniAppQrCodeOfBindUser",
    // method: "post",
    data: data,
  });
}
// 上传用户头像
export function uploadUserAvatarApi (data) {
  return request({
    url: "/yishoudan/user/changeUserImgsrc",
    method: "post",
    headers: { "Content-Type": "multipart/form-data" },
    data: setqs(data),
    // data,
  });
}
// 获取我的老乡
export function userTownsmanApi (data) {
  return request({
    url: "/yishoudan/agency/user/list",
    method: "post",
    data: setqs(data),
    // data,
  });
}
// 获取点击的老乡详情
export function townsmanDetailApi (data) {
  return request({
    url: "/yishoudan/agency/user/details/" + data,
    // data,
  });
}
// 获取点击的老乡图片
export function townsmanDetailImgsApi (data) {
  return request({
    url: "/imgs/list/" + data + "?type=20",
    // data,
  });
}
// 删除图片
export function delTowmsmanDetailImgApi (data) {
  return request({
    url: "/imgs/del/" + data,
  });
}
// 提交老乡的信息
export function updateTownsmanInfoApi (data) {
  return request({
    url: "/user/updateInfo",
    method: "post",
    data: setqs(data),
  });
}
// 我的老乡各个状态统计
export function gettownsManCountApi (data) {
  return request({
    url: "/yishoudan/agency/user/listStatistics",
    method: "post",
    data: setqs(data),
  });
}
// 成员管理:获取成员列表
export function getMemberListApi (data) {
  return request({
    url: "/yishoudan/user/getAgencyCorpUsers",
    method: "post",
    data: setqs(data),
  });
}
// 成员管理:删除成员
export function deleteMemberApi (data) {
  return request({
    url: "/yishoudan/user/delAgencyCorpUser",
    method: "post",
    data: setqs(data),
  });
}

// 成员管理:添加成员
export function addMemberApi (data) {
  return request({
    url: "/yishoudan/user/addAgencyUser",
    method: "post",
    data: setqs(data),
  });
}

// 成员管理:更新成员
export function updateMemberApi (data) {
  return request({
    url: "/yishoudan/user/updateAgencyCorpUser",
    method: "post",
    data: setqs(data),
  });
}
// 数据统计列表获取
export function dataStatisticsListApiold (data) {
  return request({
    url: "/yishoudan/statistics/agency/team",
    method: "post",
    // headers: { "Content-Type": "multipart/form-data" },
    data: setqs(data),
    // data,
  });
}
// 数据统计列表获取
export function dataStatisticsListApi (data) {
  return request({
    url: "/yishoudan/statistics/agency/teamWithGroup",
    method: "post",
    // headers: { "Content-Type": "multipart/form-data" },
    data: setqs(data),
    // data,
  });
}
// 数据统计工单详情获取
export function dataStatisticsTeamDetailApi (data) {
  return request({
    url: "/yishoudan/statistics/agency/teamDetail",
    method: "post",
    // headers: { "Content-Type": "multipart/form-data" },
    data: setqs(data),
  });
}
// 获取成员分组信息
export function getMemberGroupApi (data) {
  return request({
    url: "/yishoudan/agency/team/list",
    method: "get",
  });
}
// 添加成员分组
export function addMemberGroupApi (data) {
  return request({
    url: "/yishoudan/agency/team/add",
    method: "post",
    data: setqs(data),
  });
}
// 更新成员分组
export function updateMemberGroupApi (data) {
  return request({
    url: "/yishoudan/agency/team/update",
    method: "post",
    data: setqs(data),
  });
}
// 删除成员分组
export function delMemberGroupApi (data) {
  return request({
    url: "/yishoudan/agency/team/del/" + data,
    method: "get",
  });
}
// 成员管理分组下移
export function moveGroupNextApi (data) {
  return request({
    url: "/yishoudan/agency/team/next/" + data,
    method: "get",
  });
}
// 成员管理分组上移
export function moveGroupPrevApi (data) {
  return request({
    url: "/yishoudan/agency/team/prev/" + data,
    method: "get",
  });
}

// 大屏显示开关
export function memberShowScreenApi (data) {
  return request({
    url: "/yishoudan/user/agencyCorpUser/showAgencyScreen",
    method: "post",
    data: setqs(data),
  });
}

// 大参与数据统计开关
export function memberJoinDataApi (data) {
  return request({
    url: "/yishoudan/user/agencyCorpUser/inAgencyStatistics",
    method: "post",
    data: setqs(data),
  });
}