import request from '@/utils/request'

// 查询IB佣金钱包余额
export const getIbFund = () => {
  return request({
    url: '/app/ibHome/getIbFund',
    method: 'get'
  })
}

// 查询IB佣金余额
export const getIbFundSum = () => {
  return request({
    url: '/app/ibHome/getIbFundSum',
    method: 'get'
  })
}

// 概览
export function getPhaseSummarizing(query) {
  return request({
    url: '/app/partners/getPhaseSummarizing',
    method: 'get',
    params: query
  })
}

// 查询当前客户数量
export const statCustomerNum = () => {
  return request({
    url: '/app/partners/statCustomerNum',
    method: 'get'
  })
}

// 概览数据图表统计
export function statOverviewChart(query) {
  return request({
    url: '/app/partners/statOverviewChart',
    method: 'get',
    params: query
  })
}

// 我的客户列表查询
export const queryMyCustomerList = (query) => {
  return request({
    url: '/app/partners/queryMyCustomerList',
    method: 'get',
    params: query
  })
}

// 查询代理树形数据
export const getIbtree = (query) => {
  return request({
    url: '/app/partners/getIbtree',
    method: 'get',
    params: query
  })
}

// 我的代理列表查询
export const queryMyAgentList = (query) => {
  return request({
    url: '/app/partners/queryMyAgentList',
    method: 'get',
    params: query
  })
}

// 佣金设置-查询返佣规则
export const queryRebate = () => {
  return request({
    url: '/app/partners/queryRebate',
    method: 'get'
  })
}

// 佣金设置-查询层级设置信息
export const getAllJunior = (query) => {
  return request({
    url: '/app/partners/getAllJunior',
    method: 'get',
    params: query
  })
}

// 佣金设置-保存层级设置
export const saveRebateSet = (data) => {
  return request({
    url: '/app/partners/saveRebateSet',
    method: 'post',
    data: data
  })
}

// IB申请转账接口
export const saveTransfer = (data) => {
  return request({
    url: '/app/ibHome/transfer/save',
    method: 'post',
    data: data
  })
}

// IB申请出金接口
export const saveGoldOut = (data) => {
  return request({
    url: '/app/ibHome/fundOut/save',
    method: 'post',
    data: data
  })
}