couponList.wxml 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 wx:if="{{currentFixedFilterIndex == 0}}"> 
          <image class="arrowIcon" src="{{showFliter ? './images/blackupa@3x.png' : './images/blackdwona@3x.png'}}" catchtap='selectFliterContent'/>
      </block>
      <block wx: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 wx: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" wx:if="{{currentFixedFilterIndex == 0}}" bind:duihuanTapped="duihuanTapped"></couponSearch> 

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

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

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