import { View, Button } from '@tarojs/components' import { useState, useEffect } from 'react' interface EarningsCardProps { availableAmount?: number pendingAmount?: number onWithdraw?: () => void } function EarningsCard({ availableAmount = 0.00, pendingAmount = 0.00, onWithdraw }: EarningsCardProps) { const handleWithdraw = () => { if (onWithdraw) { onWithdraw() } } return ( {/* 装饰性背景元素 */} {/* 可提现金额 */} 可提现 {availableAmount.toFixed(2)} 元 待提现 {pendingAmount.toFixed(2)} 元 {/* 提现按钮 */} ) } export default EarningsCard