coupon.wxml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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="money">¥{{item.coupon_money}}</view>
  24. <view class="m-ellipsis">{{item.coupon_name}}</view>
  25. <view class="pop-time m-ellipsis">{{item.end_time}}到期</view>
  26. </view>
  27. </view>
  28. </view>
  29. <view class="status-bg">
  30. <image class="card-cont-status" src="{{item.statusImg}}" mode="aspectFit"/>
  31. </view>
  32. </view>
  33. </block>
  34. <!-- 空状态 -->
  35. <van-empty wx:if="{{!loadingMore && couponList.length === 0}}" description="暂无数据" />
  36. </scroll-view>
  37. <!-- 分页到底提示 -->
  38. <view wx:if="{{!loadingMore && noMore && couponList.length > 0}}" class="loading">
  39. 没有更多数据了
  40. </view>
  41. </view>