<!--packageI/parkCouponFree/index/index.wxml-->
<view class="parkCouponFree-index">
  <van-tabs active="{{ active }}" wx:if="showTab" bind:change="onChange" sticky>
    <van-tab title="查询优免券">
      <view class="banner" wx:if="{{confinOption.slide&&confinOption.slide.length>0}}">
        <!-- 顶部轮播图 -->
        <swiper id="swiperBanner" indicator-dots indicator-active-color='rgba(241, 83, 83, 1)' autoplay>
          <block wx:for="{{confinOption.slide}}" wx:key="index" wx:if="{{item.image_url}}">
            <swiper-item>
              <image src="{{item.image_url}}" mode="aspectFit" catchtap='goUrl' data-url="{{item.mini_route}}"></image>
            </swiper-item>
          </block>
        </swiper>
      </view>

      <view class="input-number-box" id="car-box">
        <!-- 车牌输入区域 -->
        <text class="input-number-warn">请输入车牌号码</text>
        <!-- 车牌输入组件 car-number-input -->
        <car-number-input id="customCarNumInput" bindfocus="onInputFocus"></car-number-input>
        <view class="inquire-btn">
          <button type="warn" bindtap="toExchangeCoupon" disabled="{{disabledInquire}}">兑换优免券</button>
        </view>
      </view>
      <!-- 车牌键盘组件 car-number-keyboard-->
      <car-number-keyboard id="customKeyboard" keyboard-type="1" bindclick="onKeyboardClick"
        binddelete="onKeyboardDelete">
      </car-number-keyboard>

      <view class="des-text">{{confinOption.page_desc}}</view>
      <!-- 后台开启 叠加功能 显示 -->
      <view class="warn-text"><text
          style="color: #f15353;">提示：</text>{{confinOption.is_repeat?'车辆需要在停车场内才可发放商家优免券,后台开启叠加功能每辆车只能拥有10张优免券':'车辆需要停在停车场内才可发放商家优免券，后台未开启叠加功能每辆车拥有1张优免券'}}</view>

      <view style="width: 100%;height: 50vh;"></view>
    </van-tab>

    <van-tab title="我的优免券">
      <car-coupon wx:for="{{list}}" coupon-type="0" items="{{item}}" catchtap="navigateToMin"></car-coupon>
      <yz-blank datas="{{list}}" text="暂无数据，请先兑换优免券..." wx:if="{{list.length == 0}}"></yz-blank>
    </van-tab>
  </van-tabs>
</view>