<view class="select-time-container">
  <view class="list-container">
    <block a:for="{{showList}}">
      <!-- 可预约 -->
      <view a:if="{{!item.full}}" onTap="onConfirmTime" data-index="{{index}}" data-item="{{item}}" class="item {{index === activePage ? 'active' : ''}}">
        <text>{{item.testTimeDesc}}</text>
        <view class="icon" a:if="{{index === activePage}}">
          <am-icon class="icon-check" type="check" color="#fff" size="12" />
        </view>
      </view>
      <!-- 不可预约 -->
      <view a:if="{{item.full}}" onTap="onConfirmTime" data-index="{{index}}" data-item="{{item}}" class="item disable-item">
        <am-icon type="forbid_" color="#ccc" size="20" />
        <text class="full-time">{{item.testTimeDesc}}</text>
      </view>
    </block>
  </view>
  <view class="more" a:if="{{timeList.testTimeList.length > 2}}">
    <text onTap="handleOpenMore">更多时间</text>
    <am-icon onTap="handleOpenMore" class="more-icon" type="right" color="#ccc" size="16" />
  </view>
  <!-- 更多时间弹窗 -->
  <popup show="{{show}}" title="请选择就诊日期" onClose="onClosePopup" z-index="{{999}}">
    <view class="select-time-popup">
      <view class="top">
        <text class="top-title">请选择就诊日期</text>
        <view onTap="onClosePopup">
          <am-icon type="close" color="#444" size="16" />
        </view>
      </view>
      <view class="attention">{{ timeList.testTimeDesc }}</view>
      <view class="item-box" a:for="{{ timeList.testTimeList }}">
        <view class="item-box-left">{{item.testTimeDesc}}</view>
        <view class="item-box-button" data-item="{{item}}" data-index="{{index}}" data-type="popup" onTap="onConfirmTime">
          <view class="button have-button" a:if="{{index === active}}">已选</view>
          <block a:else>
            <view class="button card-button" a:if="{{!item.full}}">选择</view>
            <view class="button full-button" a:else>已约满</view>
          </block>
        </view>
      </view>
    </view>
  </popup>
</view>
