import request from './http'

//提交充值
export function Recharge(data) {
  return request({
    url: `/order/transfer/createOrder`,
    method: 'post',
    data
  })
}

//订单支付确认
export function EndOrder(data) {
  return request({
    url: `/order/transfer/endOrder`,
    method: 'post',
    data
  })
}

//请求订单取消 关闭转账交易
export function CancelOrder(data) {
  return request({
    url: `/order/transfer/cancelOrder`,
    method: 'post',
    data
  })
}

//根据txid查询订单
export function CheckOrderByTxid(data) {
  return request({
    url: `/order/transfer/checkOrderByTxid`,
    method: 'post',
    data
  })
}

//提交升级订单
export function LevelUp(data) {
  return request({
    url: `/order/consume/levelUp`,
    method: 'post',
    data
  })
}


//获取对应等级所需金额
export function GetNeedFunding(data) {
  return request({
    url: `/order/consume/getNeedFunding`,
    method: 'post',
    data
  })
}


//发起提现申请
export function Apply(data) {
  return request({
    url: `/order/withdraw/apply`,
    method: 'post',
    data
  })
}

//查看个人提现历史
export function Pravite(data) {
  return request({
    url: `/order/withdraw//history/pravite`,
    method: 'post',
    data
  })
}


//查看个人提现历史
export function historyAll(data) {
  return request({
    url: `/order/withdraw/history/all`,
    method: 'post',
    data
  })
}


//财务处理提现订单
export function Handle(data) {
  return request({
    url: `/order/withdraw/handle`,
    method: 'post',
    data
  })
}

//查看提现订单详情
export function getDetail(data) {
  return request({
    url: `/order/withdraw/getDetail`,
    method: 'post',
    data
  })
}

//查看个人充值记录
export function privateOrder(data) {
  return request({
    url: `order/transfer/privateOrder`,
    method: 'post',
    data
  })
}

//查看所有充值记录
export function allAddCreditOrder(data) {
  return request({
    url: `order/transfer/allAddCreditOrder`,
    method: 'post',
    data
  })
}

//获取邮箱验证码
export function getEmailCode(data) {
  return request({
    url: `order/withdraw/getEmailCode`,
    method: 'post',
    data
  })
}

//查看个人消费历史 消费记录
export function PrivateConsume(data) {
  return request({
    url: `order/consume/privateConsume`,
    method: 'post',
    data
  })
}

//新增用户可用地址
export function AddNewAddress(data) {
  return request({
    url: `order/transfer/addNewAddress`,
    method: 'post',
    data
  })
}


//查询上次提交交易hash时间 倒计时
export function LastUseTxid(data) {
  return request({
    url: `order/transfer/lastUseTxid`,
    method: 'post',
    data
  })
}


