cardBag.wxml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <view>
  2. <view class="history">
  3. <view bindtap="jumpHis">历史记录</view>
  4. </view>
  5. <view class="tabs-wrap flex-align-center">
  6. <view class="item flex-center {{current == 1 ? 'active' : ''}}" bindtap="onTabsChange" data-id="1">
  7. 未使用
  8. </view>
  9. <view class="item flex-center {{current == 2 ? 'active' : ''}}" bindtap="onTabsChange" data-id="2">
  10. 已使用
  11. </view>
  12. <view class="item flex-center {{current == 3 ? 'active' : ''}}" bindtap="onTabsChange" data-id="3">
  13. 已过期
  14. </view>
  15. </view>
  16. <scroll-view class="scroll" scroll-y bindscrolltolower="toLower" enable-flex="true">
  17. <view class="content">
  18. <view class="conItem" wx:for="{{list}}" data-id="{{item.id}}" wx:key="{{index}}" bindtap="jumpCard" >
  19. <view class="leftLine {{current!=1?'leftLineDe':''}}"></view>
  20. <view class="right">
  21. <view class="titleFrequency">
  22. <view class="title">{{item.name}}</view>
  23. <view class="frequency" wx:if="{{current==1}}">
  24. <text class="usedTimes">{{item.used_num}}</text>
  25. <text class="totalFrequency">/{{item.total_num}}</text>
  26. </view>
  27. </view>
  28. <view class="beOverdueToUse {{item.day == 0 ? 'hideRight' : ''}}">
  29. <view class="beOverdue {{item.day == 0 ? 'hide' : ''}}">
  30. <text class="beOverdueItem">还有</text>
  31. <text class="beOverdueItem {{item.day < 15 ? 'tips' : ''}}">{{item.day}}天</text>
  32. <text class="beOverdueItem">({{item.expir_date}})过期</text>
  33. </view>
  34. <view class="toUse" catchtap="jumpProject" data-project_id="{{item.project_id}}" wx:if="{{item.project_id&&current==1}}">去使用</view>
  35. </view>
  36. </view>
  37. <view class="cardBg">
  38. <image src="{{current==1?'https://we-spa.oss-cn-shenzhen.aliyuncs.com/wxapp/20220610/cardBg.png':'https://we-spa.oss-cn-shenzhen.aliyuncs.com/wxapp/20220610/de_icon.png'}}"></image>
  39. </view>
  40. </view>
  41. <view class="loading" hidden="{{!loadMore}}">正在载入更多...</view>
  42. <view class="loading" hidden="{{!loadAll}}">已加载全部</view>
  43. <view class="no-data" style="display: {{list.length == 0 ? 'block' : 'none'}};">暂无数据~</view>
  44. </view>
  45. </scroll-view>
  46. </view>