import request from '@/utils/request'

export interface DistTeamItem {
    id: number
    sn?: number
    nickname: string
    avatar: string
    create_time: string
}

export interface DistTeamResult {
    list: DistTeamItem[]
    total: number
    page: number
    size: number
}

export interface ShareInfo {
    invite_code: string
    nickname: string
    avatar: string
    h5_domain: string
    team_count?: number
}

/**
 * 获取分享/邀请信息
 */
export function getShareInfo() {
    return request.get<ShareInfo>({ url: '/share/getShareInfo' })
}

/**
 * 获取邀请列表（团队成员）
 */
export function getInviteList(data: { page?: number; size?: number; level?: number }) {
    return request.get<DistTeamResult>({ url: '/share/getInviteList', data })
}
