| | |
| | | <wxs src="./filters.wxs" module="filters" /> |
| | | <!--pages/index/index.wxml--> |
| | | <view class="container"> |
| | | <!-- 搜索栏 - 暂时隐藏 --> |
| | |
| | | <view wx:else class="banner-placeholder"> |
| | | <text class="placeholder-text">{{item.title}}</text> |
| | | </view> |
| | | |
| | | <view class="banner-overlay"> |
| | | |
| | | <!-- 覆盖层隐藏 --> |
| | | <view class="banner-overlay" style="display: none;"> |
| | | <view class="banner-title">{{item.title}}</view> |
| | | <view class="banner-desc">{{item.content}}</view> |
| | | </view> |
| | |
| | | </swiper> |
| | | </view> |
| | | |
| | | <!-- 筛选栏 --> |
| | | <view class="filter-bar"> |
| | | <!-- 模块标题 --> |
| | | <view class="section-title">比赛信息</view> |
| | | |
| | | <!-- 筛选栏(隐藏,保留逻辑) --> |
| | | <view class="filter-bar" wx:if="{{false}}"> |
| | | <view class="filter-tabs"> |
| | | <view |
| | | class="filter-tab {{filterStatus === 'all' ? 'active' : ''}}" |
| | | bindtap="onFilterChange" |
| | | data-status="all" |
| | | > |
| | | 全部 |
| | | </view> |
| | | <view |
| | | class="filter-tab {{filterStatus === 'SIGNUP' ? 'active' : ''}}" |
| | | bindtap="onFilterChange" |
| | | data-status="SIGNUP" |
| | | > |
| | | 报名中 |
| | | </view> |
| | | <view |
| | | class="filter-tab {{filterStatus === 'PLAYING' ? 'active' : ''}}" |
| | | bindtap="onFilterChange" |
| | | data-status="PLAYING" |
| | | > |
| | | 进行中 |
| | | </view> |
| | | <view |
| | | class="filter-tab {{filterStatus === 'ENDED' ? 'active' : ''}}" |
| | | bindtap="onFilterChange" |
| | | data-status="ENDED" |
| | | > |
| | | 已结束 |
| | | </view> |
| | | <view class="filter-tab {{filterStatus === 'all' ? 'active' : ''}}" bindtap="onFilterChange" data-status="all">全部</view> |
| | | <view class="filter-tab {{filterStatus === 'SIGNUP' ? 'active' : ''}}" bindtap="onFilterChange" data-status="SIGNUP">报名中</view> |
| | | <view class="filter-tab {{filterStatus === 'PLAYING' ? 'active' : ''}}" bindtap="onFilterChange" data-status="PLAYING">进行中</view> |
| | | <view class="filter-tab {{filterStatus === 'ENDED' ? 'active' : ''}}" bindtap="onFilterChange" data-status="ENDED">已结束</view> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 赛事列表 --> |
| | | <!-- 赛事列表:新版水平卡片(左图右文,按钮靠右) --> |
| | | <view class="activity-list"> |
| | | <view |
| | | class="activity-card card" |
| | | wx:for="{{activities}}" |
| | | class="activity-card-horizontal" |
| | | wx:for="{{activities}}" |
| | | wx:key="id" |
| | | bindtap="onActivityTap" |
| | | data-index="{{index}}" |
| | | > |
| | | <!-- 赛事封面 --> |
| | | <view class="activity-cover"> |
| | | <image wx:if="{{item.coverImage && item.coverImage.fullUrl}}" class="cover-image" src="{{item.coverImage.fullUrl}}" mode="aspectFill" /> |
| | | <view wx:else class="cover-placeholder"> |
| | | <text class="cover-placeholder-text">{{item.nameText}}</text> |
| | | <view class="activity-row"> |
| | | <view class="thumb-col"> |
| | | <image wx:if="{{item.coverImage && item.coverImage.fullUrl}}" class="thumb-image" src="{{item.coverImage.fullUrl}}" mode="aspectFill" /> |
| | | <view wx:else class="thumb-placeholder">{{item.nameText}}</view> |
| | | </view> |
| | | <view class="status-badge {{getStatusClass(item.state)}}"> |
| | | {{item.stateName}} |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 赛事信息 --> |
| | | <view class="activity-info"> |
| | | <view class="activity-title">{{item.name}}</view> |
| | | <view class="activity-desc">{{item.description}}</view> |
| | | |
| | | <!-- 时间信息 --> |
| | | <view class="time-info"> |
| | | <view class="time-item"> |
| | | <text class="time-label">活动时间:</text> |
| | | <text class="time-value">{{formatDate(item.matchTime)}}</text> |
| | | <view class="info-col"> |
| | | <view class="activity-title-lg">{{item.name}}</view> |
| | | |
| | | <view class="deadline">报名截止:{{filters.formatDateYYYYMMDD(item.signupDeadline)}}</view> |
| | | <view class="registered">已报名:{{item.playerCount}}人</view> |
| | | <view class="btn-row"> |
| | | <button class="ghost-btn" catchtap="onDetailTap" data-id="{{item.id}}">查看详情</button> |
| | | </view> |
| | | <view class="time-item" wx:if="{{item.signupDeadline}}"> |
| | | <text class="time-label">报名截止:</text> |
| | | <text class="time-value">{{formatDate(item.signupDeadline)}}</text> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 地点信息 --> |
| | | <view class="location-info" wx:if="{{item.address}}"> |
| | | <text class="location-icon">📍</text> |
| | | <text class="location-text">{{item.address}}</text> |
| | | </view> |
| | | |
| | | <!-- 报名进度和操作按钮 --> |
| | | <view class="bottom-info"> |
| | | <view class="registration-info" wx:if="{{item.playerMax > 0}}"> |
| | | <view class="progress-row"> |
| | | <text class="progress-text">报名人数:{{item.playerCount}}/{{item.playerMax}}</text> |
| | | <view class="activity-actions"> |
| | | <view class="action-btn btn btn-primary" wx:if="{{canRegister(item)}}"> |
| | | 立即报名 |
| | | </view> |
| | | <view class="action-btn btn btn-secondary" wx:else> |
| | | 查看详情 |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="progress-bar"> |
| | | <view |
| | | class="progress-fill" |
| | | style="width: {{getRegistrationProgress(item.playerCount, item.playerMax)}}%" |
| | | ></view> |
| | | </view> |
| | | </view> |
| | | <view class="activity-actions" wx:else> |
| | | <view class="action-btn btn btn-primary" wx:if="{{canRegister(item)}}"> |
| | | 立即报名 |
| | | </view> |
| | | <view class="action-btn btn btn-secondary" wx:else> |
| | | 查看详情 |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 标签 --> |
| | | <view class="tags" wx:if="{{item.tags && item.tags.length > 0}}"> |
| | | <text class="tag" wx:for="{{item.tags}}" wx:key="*this">{{item}}</text> |
| | | </view> |
| | | </view> |
| | | </view> |