coupon.wxml 3.85 KB

<!--coupon.wxml-->
 <template name='coupon'>
      <view class='couponContainer'>
         <image class='imageContainer' src="{{item.containerBg}}" mode='scaleToFill'> 
        <!-- <view class='imageContainer' style='background-image: url({{item.containerBg}})' >         -->
          <view class='couponName'>{{item.couponDetailInfomation}}</view>
          <!-- 价格相关 -->
          <view class='couponPriceContainer'>
            <view class='couponPrice'>{{item.couponValue}}</view>
            <view class='couponPermission'>{{item.rule4ShortName}}</view>
          </view>
          <view class='couponDeadLine'>
            <view class='couponTime'>{{item.couponValidity}}</view>
            <view visiable='{{item.overState?true:false}}' 
            class='couponTimeDesc' >{{item.overState}}</view>
          </view>

          <!-- hidden='{{item.status==2?true:false}}' -->
          <view  class='couponMessage'>
            <view bindtap='showDetailMsg' data-code ='{{index}}' class='messageDesc'>详细信息</view>
            <image bindtap='showDetailMsg' data-code ='{{index}}' class='arrow' src="{{item.bottom_hidden?'./images/down-ic@2x.png':'./images/up-ic@2x.png'}}"></image>
          </view>

          <image class='couponTag' src='{{item._tag}}'></image>
          <image class='couponUseBtn' bindtap='useNowTapped' data-coupon_id ='{{item.couponId}}' data-coupon_code='{{item.couponCode}}' data-coupon_title='{{item.couponDetailInfomation}}' src='{{item.usebtn}}'>
      
          </image>
        </image>                

        <image hidden='{{item.bottom_hidden}}' class='couponBottomDesc' style='height:{{item.bottomHeight}}rpx' src='images/xiafang@2x.png'>
          <view class='couponDesc'>
            
            <view class='couponDescCell'>
              <block  wx:for='{{item.notes}}' wx:key='{{index}}'>
              <view class='descText'>{{item}}</view>  
              </block>
            </view>
            
          </view>
        </image>
      </view>
</template>

<view class="rootContainer" style="height:{{screen_height-64}}px">
  <view class='topContainer' clearfix>
    <view class='topInput'>
      <input bindinput='couponCodeInput' class='inputClass' placeholder='请输入优惠码'></input>
      <view bindtap='exchangeCoupon' class='btn' style="background-color:{{exchangeBtn?'#444444':'#b0b0b0'}}">
        <view class='btnText'>兑换</view>
      </view>
    </view>
    <view class='topDesc'>说明:优惠券不可以和优惠码叠加使用,普通优惠券可以和运费券叠加使用。</view>
  </view>
   <view class='topLine' clearfix></view> 
  <view class='selectTag' clearfix>
    <view class='noUseTag' data-type='1' bindtap='useTapped' style="color:{{currentStatus==1?'#444444':'#b0b0b0'}}">未使用</view>
    <view class='midLine'></view>
    <view class='usedTag' data-type='2' bindtap='useTapped' style="color:{{currentStatus==2?'#444444':'#b0b0b0'}}">已使用</view>
  </view>

  <!-- <scroll-view class='scrollContainer' bindscrolltolower='loadMore'> -->
  <view class='list-container' hidden='{{showEmptyContainer?true:false}}'>
  <block wx:for="{{coupon_list}}" wx:key='{{index}}'>
        <template is='coupon' data='{{index,item}}'/>
    </block>
  </view>
   <view class="loadMore" hidden="{{loadMore?false:true}}">
        <text class="loadText">加载中...</text>
  </view>

  <view wx:if='{{showEmptyContainer}}' class='emptyClass clearfix' style='width:100%;height:100%;margin-top:400rpx'>
    <image src="images/empty@3x.png" style="width:215rpx;height:124rpx;margin-top:180rpx"></image>
     <view style="font-size:30rpx;text-align:center;margin-top:30rpx;color:#444444;">您还没有优惠券</view>
    <!-- <button bindtap="goBackToTab" class="loginBtn">去逛逛</button> -->
  </view>
  <!-- </scroll-view> -->
</view>
<import src="../../vendors/toast/wetoast.wxml"/>
<template is="wetoast" data="{{...__wetoast__}}"/>