<!--packageH/o2o/storeConsumeIncme/storeConsumeIncme.wxml-->
<van-tabs active="{{ active }}" bind:change="onChange" title-active-color="#f14e4e">
  <van-tab title="全部"></van-tab>
  <van-tab title="未使用"></van-tab>
  <van-tab title="已使用"></van-tab>
</van-tabs>

<view class="listBox">
  <!-- 兑换的时候要这个clas，反之不要 -->
  <view class="box_dh" wx:for="{{info}}" wx:key="index" wx:if="{{info}}">
    <view class="list">
      <view class="title">{{item.name}}</view>
      <view class="bottom">
        <view class="left">
          <view class="txt">消费卡额度</view>
          <view class="price">￥{{item.amount}}</view>
        </view>
        <view class="right" wx:if="{{item.state == '0'}}" catchtap="goUse" data-id="{{item.id}}">
          使用
        </view>
        <image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/storeConsumeIncmeYDH@3x.png" wx:if="{{item.state == '1'}}"></image>
      </view>
    </view>
    <!-- 已使用显示使用时间和门店名称 -->
    <view class="userM" wx:if="{{item.card_use.created_at && item.card_use.store_name}}">
      <text>使用时间：{{item.card_use.created_at}}</text>
      <text>门店：{{item.card_use.store_name}}</text>
    </view>
  </view>
  <view style="color:#9999;margin-top:30rpx;text-align: center;" wx:if="{{info.length <= 0}}">暂无更多</view>
</view>