<!--pages/integral/exchange.wxml-->
<view style="box-sizing:border-box;display: block;">
  <view class="card-list" wx:for="{{cardList}}" wx:key="key" data-id="{{item.id}}">
    <view class="card-list-top flex-row">
      <image class="top-image" src="{{item.image}}" mode="aspectFill"></image>
      <view class="content">
        <view class="content-title">
          <text>{{item.coupon_name}}</text>
        </view>
        <view class="content-type">
          <text>代金券1张</text>
        </view>
        <view class="content-num" wx:if="{{item.show != 0}}">
          <text>券码：{{item.coupon_code}}</text>
        </view>
      </view>
      <view class="status" :style="item.order_status === 0 ? 'line-height: 168upx;' : 'line-height: 84upx;'">
        <text class="status-text" style="color: rgb(245, 108, 108);" catchtap="toInstructions">使用说明</text>
        <text class="status-text" style="color: rgb(51, 51, 51);">{{item.order_status === 1 ? '已使用' : item.order_status === 2 ? '已过期' : ''}}</text>
      </view>
    </view>
    <view class="time">
      <text>有效期：</text>
      <text>{{item.start}} </text>
      <text>至</text>
      <text> {{item.end}}</text>
    </view>
  </view>

  <view class="card-img" wx:if="{{cardList.length === 0}}">
    <view class="card-img-text">
      <text>暂无卡券</text>
    </view>
  </view>
</view>