Files
webman-buildadmin/web/src/api/backend/dashboard.ts
2026-04-18 16:14:47 +08:00

58 lines
1.3 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import createAxios from '/@/utils/axios'
export const url = '/admin/Dashboard/'
export interface DashboardTrend {
days: string[]
new_users: number[]
deposit_amount: string[]
bet_amount: string[]
}
export interface DashboardChannelShareItem {
name: string
value: number
}
/** 成功充值金额按渠道value 为两位小数字符串) */
export interface DashboardDepositAmountChannelItem {
name: string
value: string
}
export interface DashboardRecentUser {
id: number
username: string
create_time: number
channel_name: string
head_image: string
}
export interface DashboardStats {
user_total: number
user_new_today: number
user_new_yesterday: number
user_new_growth_pct: number | null
deposit_today_amount: string
deposit_today_count: number
withdraw_pending: number
bet_today_amount: string
bet_today_count: number
}
export interface DashboardPayload {
remark: string
stats: DashboardStats
trend: DashboardTrend
channel_share: DashboardChannelShareItem[]
deposit_amount_channel_share: DashboardDepositAmountChannelItem[]
recent_users: DashboardRecentUser[]
}
export function index() {
return createAxios({
url: url + 'index',
method: 'get',
})
}