import React from 'react'; import { View, Text } from '@tarojs/components'; import './index.scss'; interface PointsCardProps { balance: number; consecutiveDays: number; checkedIn: boolean; checkinLoading?: boolean; onCheckin?: () => void; } const PointsCard: React.FC = ({ balance, consecutiveDays, checkedIn, checkinLoading = false, onCheckin, }) => { return ( {/* 装饰圆 */} 我的积分 {balance.toLocaleString()} {consecutiveDays > 0 && ( 已连续签到 {consecutiveDays} 天 )} !checkedIn && !checkinLoading && onCheckin?.()} > {checkinLoading ? '...' : checkedIn ? '已签到' : '签到'} ); }; export default React.memo(PointsCard);