<!--subPackage/page/pages/myValueCardInfo/myValueCardInfo.wxml-->
<view class='my-card-info'>
  <image src='{{valueCardInfo.backGroundUrl}}' mode='widthFix'></image>
  <label>剩余{{valueCardInfo.leftTimes}}次/{{valueCardInfo.useResidueDays}}天后过期</label>
</view>

<view class='left-num-container'>
  <!-- 小于5时居中显示 -->
  <view class='left-icons limit-5' wx:if="{{valueCardInfo.totalTimes <= 5}}">
    <view class='icons' 
    wx:for="{{valueCardInfo.icons}}"
    wx:for-item="item"
    wx:for-index="idx"
    wx:key="*this">
      <image src='{{item.icon}}' mode='aspectFit'></image>
    </view>
  </view>
  <!-- 大于5时左对齐 -->
  <view class='left-icons' wx:else>
    <view class='icons' 
    wx:for="{{valueCardInfo.icons}}"
    wx:for-item="item"
    wx:for-index="idx"
    wx:key="*this">
      <image src='{{item.icon}}' mode='aspectFit'></image>
    </view>
  </view>

  <view class='bar-code-container'>
      <canvas canvas-id="barcode" 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>


<view class='card-info-body'>
  <view class='card-desc-item' wx:if="{{valueCardInfo.hasDate}}">
    <view class='lf'>活动时间</view>
    <view class='rg'>{{valueCardInfo.startTime}} 至 {{valueCardInfo.endTime}}</view>
  </view>
  <view class='card-desc-item' wx:if="{{valueCardInfo.buyAwayType == 1}}">
    <view class='lf'>现金支付</view>
    <view class='rg'>￥{{valueCardInfo.buyPriceText}}</view>
  </view>
  <view class='card-desc-item' wx:if="{{valueCardInfo.buyAwayType == 2}}">
    <view class='lf'>积分兑换</view>
    <view class='rg'>{{valueCardInfo.buyIntegration}}积分</view>
  </view>
  <view class='card-desc-item' 
    wx:for="{{valueCardInfo.descArr}}"
    wx:for-item="item"
    wx:for-index="idx"
    wx:key="*this">
    <view class='lf'>{{item.label ? item.label : '说明内容' }}</view>
    <view class='rg'>
      <view class='list-item' 
      >{{item.value}}</view>
    </view>
  </view>
</view>
