import request from '@/utils/request';

// 查询会员信息列表
export function listUmsMember(query, pageReq) {
  return request({
    url: '/ums/member/list',
    method: 'post',
    data: query,
    params: pageReq
  });
}
// 查询会员账号钱账单
export function listCurrent(query, pageReq) {
  return request({
    url: '/ums/account/bill',
    method: 'post',
    data: query,
    params: pageReq
  });
}

// 查询会员信息详细
export function getUmsMember(id) {
  return request({
    url: '/ums/member/' + id,
    method: 'get'
  });
}

// 新增会员信息
export function addUmsMember(data) {
  return request({
    url: '/ums/member',
    method: 'post',
    data: data
  });
}

// 修改会员信息
export function updateUmsMember(data) {
  return request({
    url: '/ums/member',
    method: 'put',
    data: data
  });
}
export function updateUmsMemberMark(data) {
  return request({
    url: '/ums/member/mark/update',
    method: 'post',
    data: data
  });
}

// 删除会员信息
export function delUmsMember(id) {
  return request({
    url: '/ums/member/' + id,
    method: 'delete'
  });
}

// 导出会员信息
export function exportUmsMember(query) {
  return request({
    url: '/ums/member/export',
    method: 'get',
    params: query
  });
}

// 更改会员账号状态
export function changeAccountStatus(data) {
  return request({
    url: '/ums/member/status/change',
    method: 'post',
    data: data
  });
}

// 获取解密手机号
export function decryptedPhone(data) {
  return request({
    url: `/ums/member/phone/decrypt/` + data,
    method: 'get'
  });
}

// 查询会员统计数据
export function viewStatistics(memberId) {
  return request({
    url: `/ums/member/view/statistics/` + memberId,
    method: 'get'
  });
}

export function getMiniWechatImg(params) {
  return request({
    url: `/ums/member/wechat/code`,
    method: 'get',
    params
  });
}

export function judgeQrCode(params) {
  return request({
    url: `/no-auth/verified/code`,
    method: 'get',
    params
  });
}

// 查询会员信息账号详情
export function getUserAccountInfo(memberId) {
  return request({
    url: `/ums/member/account/${memberId}`,
    method: 'get'
  });
}

// 查询账户列表
export function getUserAccountList(data) {
  return request({
    url: `/ums/member/account/list`,
    method: 'post',
    data: data
  });
}

// 会员登录详情
export function getUserLoginInfoData(data) {
  return request({
    url: `/ums/member/loginInfo/list`,
    method: 'post',
    data: data
  });
}

// 会改会员状态
export function upDateMemberStatus(data) {
  return request({
    url: `/ums/member/status/change`,
    method: 'post',
    data: data
  });
}

// 编辑会员基础信息
export function editUserData(data) {
  return request({
    url: `/ums/member/update`,
    method: 'post',
    data: data
  });
}

// 用户的关注、粉丝、好友列表
export function getUserFriendsList(data) {
  return request({
    url: `/ums/fans/friend/list?memberId=${data.memberId}`,
    method: 'post',
    data: data
  });
}
// 用户的关注、粉丝、好友列表
export function getUserFocusList(data) {
  return request({
    url: `/ums/fans/follow/list?memberId=${data.memberId}`,
    method: 'post',
    data: data
  });
}
// 用户的关注、粉丝、好友列表
export function getUserFansList(data) {
  return request({
    url: `/ums/fans/fan/list?memberId=${data.memberId}`,
    method: 'post',
    data: data
  });
}

// 黑名单列表
export function getUserBlackList(params) {
  return request({
    url: `/ums/fans/block/list`,
    method: 'get',
    params
  });
}

// 余额变更记录列表
export function getUserBalanceList(data) {
  return request({
    url: `/ums/account/change/record/list`,
    method: 'post',
    data: data
  });
}

// 删除用户
export function deleteUser(id) {
  return request({
    url: `/ums/member/${id}`,
    method: 'delete'
  });
}

// 用户封禁记录
export function getUserBannelList(data) {
  return request({
    url: `/ums/forbidden/list`,
    method: 'post',
    data: data
  });
}

// 用户银行卡信息
export function getUserBankCardList(data) {
  return request({
    url: `/ums/bank/list`,
    method: 'post',
    data: data
  });
}

// 用户提现记录
export function getUserWithdrawList(data) {
  return request({
    url: `/ums/withdraw/list`,
    method: 'post',
    data: data
  });
}

// 用户审核提现
export function setWithdrawStatus(data) {
  return request({
    url: `/ums/withdraw/update`,
    method: 'post',
    data: data
  });
}

// 用户充值记录
export function getUserChargeList(data) {
  return request({
    url: `/ums/charge/list`,
    method: 'post',
    data: data
  });
}
