<!--pages/reservation/reservation.wxml-->

<view class='charging_text_title'>
    <view class='charging'>
      <image src='/images/charging2_1.png'></image>
    </view>
    <view class='charging_text_title1'><!--
      <text class='bold'>{{chargPile.chargPileName}}</text>
      <text class="h1">终端编号：{{chargPile.chargPileId}}</text>-->
      <text class='bold'>{{chargPileName}}</text>
      <text class="h1">终端编号：{{chargPileId}}</text>
    </view>
</view>
<view class="select_card">
  <view class="card {{dayIndex==1?'active':''}}" data-idx="1" bindtap="switchDay">
    <view class="title">{{dayFlag1}}</view>
    <image wx:if="{{dayIndex!=1}}" class="png" src="/images/yulan.png"/>
    <image wx:if="{{dayIndex==1}}" class="png_active" src="/images/yulan_active.png"/>
  </view>
  <view class="card {{dayIndex==2?'active':''}}" data-idx="2" bindtap="switchDay">
    <view class="title">{{dayFlag2}}</view>
    <image wx:if="{{dayIndex!=2}}" class="png" src="/images/yulan.png"/>
    <image wx:if="{{dayIndex==2}}" class="png_active" src="/images/yulan_active.png"/>
  </view>
  <view class="card {{dayIndex==3?'active':''}}" data-idx="3" bindtap="switchDay">
    <view class="title">{{dayFlag3}}</view>
    <image wx:if="{{dayIndex!=3}}" src="/images/yulan.png"/>
    <image wx:if="{{dayIndex==3}}" class="png_active" src="/images/yulan_active.png"/>
  </view>
  <view class="card {{dayIndex==4?'active':''}}" data-idx="4" bindtap="switchDay">
    <view class="title">{{dayFlag4}}</view>
    <image wx:if="{{dayIndex!=4}}" class="png" src="/images/yulan.png"/>
    <image wx:if="{{dayIndex==4}}" class="png_active" src="/images/yulan_active.png"/>
  </view>
</view>
<view class="title2">已被预约时段</view>
<view class="title2_sub">(显示近4天已被预约时段，以下时段无法重复预约，请酌情选择预约时间<block wx:if="{{reservationBtn}}">。预约开始时间前 {{maxEarlyExerciseTime}} 分钟至后 {{maxReservOvertime}} 分钟内启动充电视为履约，其它时间启充或未充电视为违约，违约 {{breakPunishCount}} 次后暂停预约功能</block>)</view>
<view class="title2_line"></view>
<scroll-view class="scrollView" scroll-y='true' wx:if="{{timeList.length > 0}}">
  <view wx:for="{{timeList}}" wx:key="unique" data-index="{{index}}" class="card">{{item.starttime}} ~ {{item.endtime}}
  </view>
</scroll-view>

<view class="scrollView" wx:if="{{timeList.length == 0}}">
  <view class="noList">暂无已被预约时段</view>
</view>
<button class='login_button' bindtap="goReservation" wx:if="{{reservationBtn}}" >预约充电</button>
<view class='login_button_err' wx:if="{{!reservationBtn}}" >您因违约次数过多，无法进行预约</view>
