<!--pages/signIn/record/record.wxml-->
<!-- 导航说明 -->
<view class="explain flex-row">
  <view class="explain-left flex-column" catchtap="{{isLogin?'getCoupon':''}}">
    <view class="explain-discount">签到优惠券</view>
    <view class="{{noCoupon?'explain-column':'explain-columnNo'}}"></view>
  </view>
  <view class="explain-center flex-column" catchtap="{{isLogin?'getDetail':''}}">
    <view class="explain-detailed">获取明细</view>
    <view class="{{noDetail?'explain-column':'explain-columnNo'}}"></view>
  </view>
  <view class="explain-right flex-column" catchtap="{{isLogin?'getUtility':''}}">
    <view class="explain-utility">使用/失效</view>
    <view class="{{noUtility?'explain-column':'explain-columnNo'}}"></view>
  </view>
</view>
<!-- 主要内容 -->
<view class="check-in-content flex-column">
  <button class="luck-draw-cz" wx:if="{{!isLogin}}" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">请登录</button>
  <!-- 优惠券内容 -->
  <view hidden="{{hiddenCoupon}}">
  
    <view class="coupon-wrap-list">
        <coupon-wrap wx:if="{{couponList.length>0}}" 
        coupon-list="{{couponList}}" 
        class="coupon_wrap"
        coupon-item-ex-class="coupon-item-style"
        coupon-circule-ex-class="coupon-circule-style"
        />
    </view>

  </view>

  <!-- 获取明细 -->
  <view hidden="{{hiddenDetail}}">
    <view class="detailed-content" wx:for="{{detailList}}" wx:key="index" data-id="{{item.id}}">
      <view class="detailed-sign flex-row">
        <view class="detailed-sign-index flex-column">
          <view class="detailed-sign-text">{{item.source =='1'?'签到':'任务'}}</view>
          <view class="detailed-sign-date">{{item.crateTime}}</view>
        </view>
        <view class="detailed-coupon flex-column">
          <view class="detailed-coupon-text">{{item.coupon.couponTitle}}</view>
        </view>
      </view>
      <view class="detailed-date flex-column">
        <view class="detailed-date-lower"></view>
      </view>
    </view>
  </view>

  <!-- 使用/失效 -->
  <view hidden="{{hiddenUtility}}">
    <view class="detailed-content" wx:for="{{stateList}}" wx:key="index" data-id="{{item.id}}">
      <view class="detailed-sign flex-row">
        <view class="detailed-sign-index flex-column">
          <view class="detailed-sign-text">{{item.coupon.couponTitle}}</view>
          <view class="detailed-sign-date">{{item.crateTime}}</view>
        </view>
        <view class="detailed-coupon flex-column"  wx:if="{{item.invalid}}">已失效</view>
        <view class="detailed-coupon flex-column"  wx:elif="{{item.used}}">已使用</view>
        <view class="detailed-coupon flex-column"  wx:else="{{!item.used}}">未使用</view>
      </view>
      <view class="detailed-date flex-column">
        <view class="detailed-date-lower"></view>
      </view>
    </view>
  </view>
  <view class="no_result" wx:if="{{noResult}}">———— 抱歉，您暂无可用优惠券 ————</view>
  <view class="no_result" wx:if="{{noMore}}">—— 人家也是有底线的 ——</view>
</view>
<!-- 底部导航 -->
<!-- <tab-bar /> -->

<custom-preview-image wx:if="{{showCustomPreview}}" src="{{previewImgSrc}}" bind:closeCallback="closePreviewImage" />