import { request } from '@/api'


// 获取账户列表
export async function getAllAccount(params: any): Promise<any> {
  return await request.get<any>('/user/getAllAccount', params)
}
// 获取用户钱包资金
export async function getWalletCapital(): Promise<any> {
  return await request.get<any>('/user/getWalletCapital')
}

//重置密码
export const editAccountPass = (params: any) => {
  return request.post('/user/editAccountPass', { ...params })
}

// 获取首页统计数据
export interface DashboardData {
  agent_count: number
  user_count: number
  today_user_count: number
  today_recharge_amount: string
  today_withdraw_amount: number
  total_recharge_amount: number
  total_withdraw_amount: number
}
 
export async function getUserIndex(): Promise<DashboardData> {
  return await request.get<DashboardData>('/user/index')
}

