2026-09-17 14:02:00 +08:00
|
|
|
<!--
|
|
|
|
|
公益活动卡片(规范 §43-46)
|
|
|
|
|
|
|
|
|
|
不变量(AGENTS.md 第 1 条):"公益免费"作为主要视觉标识突出展示,
|
|
|
|
|
前端不实现任何支付入口。
|
|
|
|
|
|
|
|
|
|
Phase 14:所有 activity.* 字段都必须在 ActivityListItemDTO 中真实存在。
|
|
|
|
|
守卫 ActivityConstraintGuardTest#cardFieldsExistInListItemDto 会解析本文件
|
|
|
|
|
校验字段名 —— 此前这里的 registeredCount / currentMaleCount / currentFemaleCount /
|
|
|
|
|
coverImageUrl / activityStartAt / suitableFor / intro 后端一个都没有,
|
|
|
|
|
导致封面、摘要、报名人数恒不显示。
|
|
|
|
|
-->
|
2026-09-09 22:05:00 +08:00
|
|
|
<view class="ui-act {{compact ? 'ui-act--compact' : ''}}" bindtap="onTap">
|
|
|
|
|
<view class="ui-act__cover">
|
2026-09-17 14:02:00 +08:00
|
|
|
<image class="ui-act__cover-img" src="{{cover || '/assets/covers/activity-default.jpg'}}" mode="aspectFill" />
|
2026-09-14 07:05:20 +08:00
|
|
|
<view class="ui-act__fee-badge">公益活动</view>
|
2026-09-09 22:05:00 +08:00
|
|
|
</view>
|
|
|
|
|
<view class="ui-act__body">
|
|
|
|
|
<view class="ui-act__title">{{activity.title}}</view>
|
2026-09-17 14:02:00 +08:00
|
|
|
<!-- 类型化卡片:不同类型显示不同标签与资格提示(Gate ①) -->
|
|
|
|
|
<view wx:if="{{typeLabel}}" class="ui-act__type-row">
|
|
|
|
|
<text class="ui-act__type-badge">{{typeLabel}}</text>
|
|
|
|
|
<text wx:if="{{eligibilityText}}" class="ui-act__eligibility">{{eligibilityText}}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="ui-act__meta"><text>{{startAtText}}</text></view>
|
|
|
|
|
<view class="ui-act__meta"><text>{{activity.locationName}}</text></view>
|
|
|
|
|
<view wx:if="{{!compact && activity.description}}" class="ui-act__intro">{{activity.description}}</view>
|
2026-09-09 22:05:00 +08:00
|
|
|
<view class="ui-act__footer">
|
|
|
|
|
<view class="ui-act__capacity">
|
2026-09-17 14:02:00 +08:00
|
|
|
<text wx:if="{{capacity}}">报名人数 {{registeredCount}}/{{capacity}}</text>
|
2026-09-09 22:05:00 +08:00
|
|
|
</view>
|
2026-09-14 07:05:20 +08:00
|
|
|
<view class="ui-act__status-action {{activity.status !== 'registration_open' ? 'disabled' : ''}}">{{activity.status === 'registration_open' ? '立即报名' : (activity.status === 'ongoing' ? '进行中' : '查看详情')}}</view>
|
2026-09-09 22:05:00 +08:00
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|