coupon.wxml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <view class="container">
  2. <header text="我的优惠券"></header>
  3. <scroll-view
  4. class="content"
  5. scroll-y="true"
  6. bindscrolltolower="onReachBottom"
  7. lower-threshold="50"
  8. refresher-enabled="true"
  9. refresher-triggered="{{refreshing}}"
  10. bindrefresherrefresh="onPullDownRefresh"
  11. >
  12. <!-- 有数据 -->
  13. <block wx:if="{{couponList.length > 0}}">
  14. <view class="card-box" wx:for="{{couponList}}" wx:key="index" data-item="{{item}}" bindtap="goPage">
  15. <image class="card-img" src="/static/image/yhq.png" mode="aspectFit"/>
  16. <view class="card-cont">
  17. <view class="card-cont-lf">
  18. <image class="canyin-img" src="/static/image/canyin.png" mode="aspectFit"/>
  19. <view>{{item.coupon_type || '代金券'}}</view>
  20. </view>
  21. <view class="card-cont-ri">
  22. <view class="card-cont-ri-text">
  23. <view class="m-ellipsis">{{item.coupon_name}}</view>
  24. <view class="pop-time m-ellipsis">{{item.end_time}}到期</view>
  25. </view>
  26. <view>
  27. <image class="card-cont-status" src="{{item.statusImg}}" mode="aspectFit"/>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. </block>
  33. <!-- 空状态 -->
  34. <van-empty wx:if="{{!loadingMore && couponList.length === 0}}" description="暂无数据" />
  35. </scroll-view>
  36. <!-- 分页到底提示 -->
  37. <view wx:if="{{!loadingMore && noMore && couponList.length > 0}}" class="loading">
  38. 没有更多数据了
  39. </view>
  40. </view>