76 lines
2.4 KiB
Plaintext
76 lines
2.4 KiB
Plaintext
<view class="container">
|
|
<swiper
|
|
class="banner"
|
|
indicator-dots="{{banners.length > 1}}"
|
|
autoplay="false"
|
|
circular="false"
|
|
indicator-color="rgba(255,255,255,0.8)"
|
|
indicator-active-color="#ffffff"
|
|
>
|
|
<block wx:for="{{banners}}" wx:key="imageUrl">
|
|
<swiper-item>
|
|
<view
|
|
class="banner-item"
|
|
bindtap="onBannerTap"
|
|
data-linktype="{{item.linkType}}"
|
|
data-eventid="{{item.eventId}}"
|
|
data-linkurl="{{item.linkUrl}}"
|
|
>
|
|
<image class="banner-image" src="{{item.imageUrl}}" mode="aspectFill" />
|
|
</view>
|
|
</swiper-item>
|
|
</block>
|
|
</swiper>
|
|
|
|
<view class="filter">
|
|
<view class="tabs">
|
|
<view class="tab {{status === 0 ? 'active' : ''}}" data-status="0" bindtap="onStatusTap">全部</view>
|
|
<view class="tab {{status === 1 ? 'active' : ''}}" data-status="1" bindtap="onStatusTap">报名中</view>
|
|
<view class="tab {{status === 2 ? 'active' : ''}}" data-status="2" bindtap="onStatusTap">比赛中</view>
|
|
<view class="tab {{status === 3 ? 'active' : ''}}" data-status="3" bindtap="onStatusTap">已结束</view>
|
|
</view>
|
|
|
|
<view class="search-row">
|
|
<input
|
|
class="search-input"
|
|
placeholder="搜索关键字"
|
|
value="{{keyword}}"
|
|
bindinput="onKeywordInput"
|
|
/>
|
|
<button class="search-btn" size="mini" type="primary" bindtap="onSearch">搜索</button>
|
|
</view>
|
|
</view>
|
|
|
|
<scroll-view
|
|
class="list"
|
|
scroll-y="true"
|
|
lower-threshold="60"
|
|
bindscrolltolower="onScrollToLower"
|
|
>
|
|
<block wx:if="{{rows.length === 0 && !loading}}">
|
|
<view class="empty">暂无数据</view>
|
|
</block>
|
|
|
|
<block wx:for="{{rows}}" wx:key="id">
|
|
<view class="card" bindtap="onEventTap" data-id="{{item.id}}">
|
|
<image class="cover" src="{{item.coverImage}}" mode="aspectFill" />
|
|
<view class="card-body">
|
|
<view class="title">{{item.eventName || '-'}}</view>
|
|
<view class="addr" wx:if="{{item.address}}">{{item.address}}</view>
|
|
<view class="time">
|
|
报名:{{item.registrationStartText}} - {{item.registrationEndText}}
|
|
</view>
|
|
<view class="footer-row">
|
|
<view class="status">{{item.eventStatusText}}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</block>
|
|
|
|
<view class="loading" wx:if="{{loading}}">
|
|
{{loadingText}}
|
|
</view>
|
|
</scroll-view>
|
|
</view>
|
|
|