1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- <view class="container">
- <!-- <view class="h">
- <view class="item {{ status == 0 ? 'active' : ''}}" bindtap="switchTab" data-index="0">
- <view class="txt">未使用</view>
- </view>
- <view class="item {{ status == 1 ? 'active' : ''}}" bindtap="switchTab" data-index="1">
- <view class="txt">已使用</view>
- </view>
- <view class="item {{ status == 2 ? 'active' : ''}}" bindtap="switchTab" data-index="2">
- <view class="txt">已过期</view>
- </view>
- </view> -->
- <van-tabs active="{{status}}" color="#09afff" bind:change="onTabChange">
- <van-tab title="未使用" name="0"></van-tab>
- <van-tab title="已使用" name="1"></van-tab>
- <van-tab title="已过期" name="2"></van-tab>
- </van-tabs>
- <view class="b">
- <view class="coupon-form" wx:if="{{status == 0}}">
- <view class="input-box">
- <input class="coupon-sn" placeholder="请输入优惠码" value="{{code}}" bindinput="bindExchange"/>
- <van-icon name="close" class="clear-icon" wx:if="{{ code.length > 0 }}" catchtap="clearExchange"/>
- </view>
- <view class="add-btn" bindtap='goExchange'>兑换</view>
- </view>
- <!-- <view class="help" wx:if="{{status == 0}}">
- <van-icon name="question-o" />
- 使用说明
- </view> -->
- <scroll-view scroll-y="true" scroll-top="{{scrollTop}}" class="my-coupon-list">
- <view wx:for="{{couponList}}" wx:for-index="index" wx:for-item="item" wx:key="id" class="my-coupon-item">
- <view class="coupon-left">
- <view wx:if="{{item.voucherType==1}}">¥<text class="coupon-amount">{{item.discount}}</text></view>
- <view wx:if="{{item.voucherType==2}}"><text class="coupon-amount">{{item.discount/10}}</text>折</view>
- <view class="coupon-type">
- <!-- {{item.name}} -->
- <span wx:if="{{item.voucherType==1}}">立减券</span>
- <span wx:if="{{item.voucherType==2}}">折扣券</span>
- </view>
- <view class="coupon-btn {{item.status===0?'active-btn':''}}" data-id="{{item.couponId}}" data-goodsvalue="{{item.goodsValue}}" bindtap="goService">立即使用</view>
- </view>
- <view class="coupon-content">
- <view class="coupon-name">{{item.desc}}</view>
- <view class="coupon-date">有效期开始:{{item.startTime}}</view>
- <view class="coupon-date">有效期结束:{{item.endTime}}</view>
- </view>
- <view class="coupon-right">
- <image class="coupon-status" mode="aspectFit" wx:if="{{item.status==1}}" src="/static/images/coupon-used.png"></image>
- <image class="coupon-status" mode="aspectFit" wx:if="{{item.status==2}}" src="/static/images/coupon-invalid.png"></image>
-
- </view>
- </view>
- <view class="page" wx:if="{{showPage}}">
- <view class="prev {{ page <= 1 ? 'disabled' : ''}}" bindtap="prevPage">上一页</view>
- <view class="next {{ (count / size) < page ? 'disabled' : ''}}" bindtap="nextPage">下一页</view>
- </view>
- </scroll-view>
- <!-- <scroll-view class="coupon-list" scroll-y="true" scroll-top="{{scrollTop}}">
-
- <view class="item {{ status == 0 ? 'active' : ''}}" wx:for="{{couponList}}" wx:for-index="index" wx:for-item="item" wx:key="id">
- <view class="tag">{{item.tag}}</view>
- <view class="content">
- <view class="left">
- <view class="discount">{{item.discount}}元</view>
- <view class="min"> 满{{item.min}}元使用</view>
- </view>
- <view class="right">
- <view class="name">{{item.name}}</view>
- <view class="time"> 有效期:{{item.startTime}} - {{item.endTime}}</view>
- </view>
- </view>
- <view class="condition">
- <text class="txt">{{item.desc}}</text>
- <image src="{{item.pic}}" class="icon"></image>
- </view>
- </view>
- <view class="page" wx:if="{{showPage}}">
- <view class="prev {{ page <= 1 ? 'disabled' : ''}}" bindtap="prevPage">上一页</view>
- <view class="next {{ (count / size) < page ? 'disabled' : ''}}" bindtap="nextPage">下一页</view>
- </view>
- </scroll-view> -->
- <view class="no-list" wx:if="{{couponList==0}}">没有更多了</view>
- </view>
- </view>
|