<!--subPackage/page/pages/myValueCard/myValueCard.wxml-->
<view class='my-value-card-list' wx:if="{{myCardsList.length > 0}}">
  <view class='my-value-card-item'
  wx:for="{{myCardsList}}"
  wx:for-item="item"
  wx:for-index="idx"
  wx:key="*this">
    <!-- 失效的时候 -->
    <view class='invalide' wx:if="{{item.validStatus == 1}}">
      <view class='status-bar'>
        <view class='card-status'>已失效</view>
      </view>
    </view>
    <view class='card-top-info' bindtap='onTapToInfoPage' data-item="{{item}}" data-index="{{idx}}">
      <image class='bg-image {{item.isOpen ? "expand" : "unexpand"}}' 
      src='{{item.backGroundUrl}}'
      mode='widthFix'></image>
       <!-- 过期时间展示 -->
       <!-- <view class='top-left-days'><label>剩{{item.leftTimes}}天</label></view> -->
       <view class="left-days">
        <label wx:if="{{item.useResidueDays > 0}}">剩余{{item.leftTimes}}次/{{item.useResidueDays}}天后过期</label>
       </view>
      <view class='card-top-info-desc'>
        <text ></text>
        <image class='qrcode' 
        src='https://img3.bigaka.com/prd/3001/202003/20200309/3001b0c7b943-a805-4550-a179-8b963913b513.png' mode='aspectFit'></image>
      </view>
    </view>
    <!-- 具体信息 -->
    <view class='card-info-extro' wx:if="{{item.isOpen}}">
      <view class='bar-code'>
        <canvas canvas-id="{{'barcode' + idx}}" binderror="canvasIdErrorCallback" />
        <view class='no'>
          <text>{{no}}</text>
          <view class="refresh" data-id="{{item.supValCardId}}" data-index="{{idx}}" bindtap="onTapRefreshNo">
            <image src="/assets/imgs/icon_refresh.png"></image>
            刷新
          </view>
        </view>
      </view>
      <view class='exp-info'>
        <label>有效时间：</label>
        <text>{{item.startTime}} 至 {{item.endTime}}</text>
      </view>
      <view class='exp-info'>
        <label style='color:#76A1D5;' data-item="{{item}}" bindtap="onTapToInfoPage">查看详细使用说明</label>
        <image data-item="{{item}}" bindtap="onTapToInfoPage" src='/assets/imgs/icon_arrow_right.png' class='arrow-image' mode='aspectFit'></image>
        <image class='unexpand-icon' 
        bindtap='onTapCloseExtro' 
        data-index="{{idx}}" 
        src='/assets/imgs/icon_arrow_up.png' 
        mode='aspectFit'></image>
      </view>
    </view>
  </view>
</view>
<!-- 空 -->
<empty text="您还未购买任何超值卡~" wx:if="{{myCardsList.length == 0}}"/>
<view class='no-more' wx:if="{{isNoData}}">-- 我也是有底线滴 --</view>

<!-- 底部购买记录 -->
<view class="buy-records" bindtap="onTapToBuyRecords">查看购买记录</view>