Commit 51c917d3 by 谢中龙

已失效优惠券最多只显示20,并增加文字说明

parent 0f70d2fd
......@@ -143,7 +143,7 @@ wxService.page({
this.setData({
invalidCouponList: this.data.invalidPageNo == 1? [...data.content]: [...this.data.invalidCouponList,...data.content],
invalidTotalPages: data.totalPages,
invalidTotalElements: data.totalElements
invalidTotalElements: data.totalElements > 20 ? 20 : data.totalElements,
})
}
}
......
......@@ -14,9 +14,9 @@
wx:for="{{couponList}}"
wx:for-item="item"
wx:for-index="k"
wx:key="{{k}}"
>
<view data-title="{{item.title}}" data-cardNo="{{item.cardNo}}" data-id="{{item.couponId}}" bindtap="handelPresentCouponDetail">
wx:key="{{k}}">
<view data-title="{{item.title}}"
data-cardNo="{{item.cardNo}}" data-id="{{item.couponId}}" bindtap="handelPresentCouponDetail">
<image class='coupon-bg' src='/assets/imgs/coupon-bg.png'/>
<view class='coupon-img' >
<image wx:if="{{item.takeCouponBgimg}}" class='coupon-bg' src='{{item.takeCouponBgimg}}' />
......@@ -43,32 +43,32 @@
</swiper-item>
<swiper-item>
<scroll-view scroll-y wx:if="{{invalidCouponList.length}}">
<view class='coupon-wrap'>
<view
class='coupon-list'
wx:for="{{invalidCouponList}}"
wx:for-item="item"
wx:for-index="k"
wx:key="{{k}}"
>
<view class='invalid-coupon' />
<!--5 已使用 !5 过期-->
<image wx:if="{{item.status == 5}}" src='/assets/imgs/invalid.png' class='invalid-img' />
<image wx:else src='/assets/imgs/expired.png' class='invalid-img' />
<image class='coupon-bg' src='/assets/imgs/coupon-bg.png' />
<view class='coupon-img'>
<image wx:if="{{item.takeCouponBgimg}}" class='coupon-bg' src='{{item.takeCouponBgimg}}' />
<image wx:else src='/assets/imgs/qr-code.png' />
</view>
<view class='coupon-info'>
<view class='coupon-name fs-28'>{{item.title}}</view>
<view class='coupon-time fs-24'>{{item.startTime}} 至 {{item.endTime}}</view>
<!-- <view class='coupon-desc fs-24'>{{item.notice}}</view> -->
</view>
<view class='coupon-code fs-24'>出示劵码</view>
</view>
</view>
<no-more wx:if="{{noMoreCouponInvalid}}" />
<view class='invalid-coupon-tips'>只显示最近20张已失效优惠券</view>
<view class='coupon-wrap'>
<view
class='coupon-list'
wx:for="{{invalidCouponList}}"
wx:for-item="item"
wx:for-index="k"
wx:key="{{k}}">
<view class='invalid-coupon' />
<!--5 已使用 !5 过期-->
<image wx:if="{{item.status == 5}}" src='/assets/imgs/invalid.png' class='invalid-img' />
<image wx:else src='/assets/imgs/expired.png' class='invalid-img' />
<image class='coupon-bg' src='/assets/imgs/coupon-bg.png' />
<view class='coupon-img'>
<image wx:if="{{item.takeCouponBgimg}}" class='coupon-bg' src='{{item.takeCouponBgimg}}' />
<image wx:else src='/assets/imgs/qr-code.png' />
</view>
<view class='coupon-info'>
<view class='coupon-name fs-28'>{{item.title}}</view>
<view class='coupon-time fs-24'>{{item.startTime}} 至 {{item.endTime}}</view>
<!-- <view class='coupon-desc fs-24'>{{item.notice}}</view> -->
</view>
<view class='coupon-code fs-24'>出示劵码</view>
</view>
</view>
<no-more wx:if="{{noMoreCouponInvalid}}" />
</scroll-view>
<view class='empty-wrap' wx:if="{{!invalidCouponList.length}}">
......
......@@ -41,6 +41,11 @@ scroll-view{
.coupon-wrap{
padding: 20rpx;
}
.invalid-coupon-tips{
padding: 0 20rpx;
color: #666666;
font-size: 24rpx;
}
.coupon-list{
width: 712rpx;
height: 209rpx;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment