couponList.ttml 3.5 KB
<view class='coupon_container'>
  <view class='coupon_header'>
    <view class="{{currentFixedFilterIndex == 0 ? 'filterSelect' : 'filterNormal'}}" data-type='0' catchtap='fixedFilterTapped' style='margin-left: 27rpx;'>未使用 ({{notuseCoupons.totleText}})
      <view class='arrowIconView' catchtap='selectFliterContent'>

      <block tt:if="{{currentFixedFilterIndex == 0}}"> 
          <image class="arrowIcon" src="{{showFliter ? './images/blackupa@3x.png' : './images/blackdwona@3x.png'}}" catchtap='selectFliterContent'/>
      </block>
      <block tt:else>
          <image class="arrowIcon" src="{{showFliter ? './images/up@3x.png' : './images/down@3x.png'}}" catchtap='selectFliterContent'/>
      </block>

        </view>
    </view>
    <view class='dividingLine'></view>
    <view class="{{currentFixedFilterIndex == 1 ? 'filterSelect' : 'filterNormal'}}" data-type='1' catchtap='fixedFilterTapped'>已使用 ({{useCoupons.totleText}})</view> 
    <view class='dividingLine'></view>
    <view class="{{currentFixedFilterIndex == 2 ? 'filterSelect' : 'filterNormal'}}" data-type='2' catchtap='fixedFilterTapped'>已失效 ({{overtimeCoupons.totleText}})</view> 
  </view>

   <block tt:if="{{showFliter}}"> 
    <couponFilter id="couponFilter" filters="{{filters}}" bind:didSelectFliter="didSelectFliter" custom-index="{{selectedSearchFliterIndex}}"></couponFilter> 
  </block>

  <scroll-view scroll-y class='scrollView' scroll-y style="height: {{scHeight}}px" bindscrolltolower="loadMore">
    <couponSearch id="couponSearch" tt:if="{{currentFixedFilterIndex == 0}}" bind:duihuanTapped="duihuanTapped"></couponSearch> 

    <view style="background: #F0F0F0;width: 100%;height: 90rpx "/>

    <view tt:if="{{currentFixedFilterIndex == 0}}" style="background: #F0F0F0;width: 100%;height: 90rpx "/>

    <block tt:if="{{currentFixedFilterIndex == 0}}"> 
      <empty id="empty" tt:if="{{notuseCoupons.list.length == 0 || !notuseCoupons}}"></empty>
      <block tt:for='{{notuseCoupons.list}}' tt:key='{{index}}'>
        <view class='space'></view>
        <couponCell id="couponCell" item="{{item}}" itemType="2" item-availableed="1" bind:useButtonTap="useButtonTap"></couponCell> 
      </block>
    </block>
    <block tt:elif="{{currentFixedFilterIndex == 1}}">
      <empty id="empty" tt:if="{{useCoupons.list.length == 0 || !useCoupons}}"></empty>
      <block tt:for='{{useCoupons.list}}' tt:key='{{index}}'>
        <view class='space'></view>
        <couponCell id="couponCell" item="{{item}}" itemType="3" item-availableed="0"></couponCell> 
      </block>
      <view class='sepTips' tt:if="{{useCoupons.list.length > 0}}">
        <view class='sepTipsLine'></view>
        <text class='sepTipsText'>以上是近期已使用的优惠券</text>
        <view class='sepTipsLine'></view>
      </view>
    </block>
    <block tt:elif="{{currentFixedFilterIndex == 2}}">
      <empty id="empty" tt:if="{{overtimeCoupons.list.length == 0 || !overtimeCoupons}}"></empty>
      <block tt:for='{{overtimeCoupons.list}}' tt:key='{{index}}'>
        <view class='space'></view>
        <couponCell id="couponCell" item="{{item}}" itemType="4" item-availableed="0"></couponCell> 
      </block>
      <view class='sepTips' tt:if="{{overtimeCoupons.list.length > 0}}">
        <view class='sepTipsLine'></view>
        <text class='sepTipsText'>以上是近期已失效的优惠券</text>
        <view class='sepTipsLine'></view>
      </view>
    </block>

    <view style="background: #F0F0F0;width: 100%;height: 120rpx; "/>

  </scroll-view> 

</view>