<view class="container">
  <header text="报名记录"></header>
  <scroll-view 
    class="content"
    scroll-y="true"
    bindscrolltolower="onReachBottom"
    lower-threshold="50"
    refresher-enabled="true"
    refresher-triggered="{{refreshing}}"
    bindrefresherrefresh="onPullDownRefresh"
  >
    <!-- 数据列表 -->
    <block wx:if="{{cardList.length > 0}}">
      <view class="card-box {{ index === 0 ? 'first-card' : '' }}" wx:for="{{cardList}}" wx:key="index">
        <view class="card-top">
          <view class="card-title-box">
            <view class="card-title">{{item.marathon_event.doings_name}}</view>
            <view class="card-time">{{item.register_time}}</view>
          </view>
          <image class="card-img" src="{{item.img}}" mode="aspectFit"/>
        </view>
        <view class="cell-box">
          <van-cell title="参赛姓名" value="{{item.nickname}}" border="{{ false }}" />
          <van-cell title="手机号" value="{{item.phone}}" border="{{ false }}" />
          <van-cell title="性别" value="{{item.genderText}}" border="{{ false }}" />
          <van-cell title="身份证号" value="{{item.race_number}}" border="{{ false }}" />
          <van-cell custom-class="cell-list" title="参赛号码" value="{{item.competition_no}}" border="{{ false }}" />
        </view>
      </view>
    </block>

    <!-- 空状态 -->
    <van-empty wx:if="{{!loadingMore && cardList.length === 0}}" description="暂无数据" />
  </scroll-view>

  <!-- 分页到底提示 -->
  <view wx:if="{{!loadingMore && noMore && cardList.length > 0}}" class="loading">
    没有更多数据了
  </view>
</view>
