import type { Task } from '@/types/task' import { View, Text, Image } from '@tarojs/components' import './index.less' interface Props { task: Task } export default function ActivityCard({ task }: Props) { const progress = task.maxParticipants ? Math.round(((task.participants || 0) / task.maxParticipants) * 100) : 0 return ( 校园活动 👥 {task.participants}/{task.maxParticipants}人 {task.title} {task.desc} {/* 参与进度条 */} {task.maxParticipants && ( )} {task.publisher.name} 📍 {task.location} 🕐 {task.time} ) }