useCoupons.wxml 3.36 KB
<view class='coupon_container'>
  <view class='coupon_header'>
    <view class="{{currentFixedFilterIndex == 0 ? 'filterSelect' : 'filterNormal'}}" data-type='0' catchtap='fixedFilterTapped' style='margin-left: 25rpx;'>可用 ({{usable_coupon_numText}}) 
    </view>
    <view class='dividingLine'></view>
    <view class="{{currentFixedFilterIndex == 1 ? 'filterSelect' : 'filterNormal'}}" data-type='1' catchtap='fixedFilterTapped'>不可用 ({{unusable_coupon_numText}})</view> 
  </view>
  <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}}"> 
      <view class='adVew' wx:if="{{showAd}}">
        <text class='adVewText'>{{head_msg}}</text>
        <view class='adVewExit' catchtap='hiddenAdViewTap'>
          <image class="adVewExitIcon" src="../couponList/images/CombinedShape@2x.png"/>
        </view>
      </view>


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

      <empty id="empty" wx:if="{{usable_coupon_Num == 0}}"></empty>
      <block wx:for='{{usable_coupon_catalogs.list}}' wx:key='{{index}}'>
        <block wx:for='{{item.coupons}}' wx:key='{{index}}'>
          <view class='space'></view>
          <couponCell id="couponCell" item="{{item}}" itemType="5" item-availableed="{{item.is_selected_support == 'Y' ? '1' : '0'}}" bind:didSelectCoupon="didSelectCoupon"></couponCell>
        </block> 
      </block>

      <view style="background: #F0F0F0;width: 100%;height: 120rpx; "/>
 
    </block>
    <block wx:elif="{{currentFixedFilterIndex == 1}}">
      <empty id="empty" wx:if="{{unusable_coupon_Num == 0}}"></empty>
      <block wx:for='{{unusable_coupon_catalogs.list}}' wx:key='{{index}}'>
        <view class='sepTips' wx:if="{{item.coupons.length > 0}}">
          <view class='sepTipsLine'></view>
          <text class='sepTipsText' style='color: #444444;'>{{item.name}}</text>
          <view class='sepTipsLine'></view>
        </view>

        <block wx:for='{{item.coupons}}' wx:key='{{index}}' wx:for-item="item">
          <couponCell id="couponCell" item="{{item}}" itemType="6" item-availableed="1"></couponCell>
          <view class='space'></view>
        </block> 
      </block>
    </block>
    
  </scroll-view> 

  <view class='bottom' wx:if="{{currentFixedFilterIndex == 0}}">
    <view class='bottomView'>
      <view class='top1'>
        <text class='bottomText'>已选择</text>
        <text class='bottomRedText'>{{coupon_pay.coupon_count}}</text>
        <text class='bottomText'>张,共优惠</text>
        <text class='bottomRedText'>{{coupon_pay.coupon_amount_str}}</text> 
        <text class='bottomText'>元</text>
      </view>
      <view class='bottom1'>
        <text class='bottomText'>待支付</text>
        <text class='bottomRedText'>{{coupon_pay.to_pay_amount_str}}</text> 
        <text class='bottomText'>元</text>
      </view>
    </view>
    <view class='bottomButton' catchtap='useTapped' style="background: #D0021B;">
     <text class='text'>确认</text>
    </view>
  </view>

</view>