cardBag.wxml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <!-- 历史记录 -->
  2. <!-- <view class="history">
  3. <view class="historyBtn" bindtap="jumpHis">历史记录</view>
  4. </view> -->
  5. <!-- 切换状态栏 -->
  6. <view class="tab">
  7. <view class="tab-item {{current==1?'activeTab':''}}" data-current="1" bindtap="selectTab">我的次卡</view>
  8. <view class="tab-item {{current==2?'activeTab':''}}" data-current="2" style="margin-left: 128rpx;" bindtap="selectTab">我的优惠券</view>
  9. <view class="moreCard" bindtap="goMoreCard">更多次卡>></view>
  10. </view>
  11. <!-- 次卡列表 -->
  12. <scroll-view wx:if="{{current==1}}" class="scroll" scroll-y bindscrolltolower="toLower" enable-flex="true">
  13. <view class="content">
  14. <view class="conItem" wx:for="{{list}}" data-status = '{{item.status}}' data-id="{{item.id}}" wx:key="index" bindtap="jumpCard" >
  15. <view class="leftLine {{item.status!=1?'leftLineDe':''}}"></view>
  16. <view class="right">
  17. <view class="titleFrequency">
  18. <view class="title">{{item.name}}</view>
  19. <view class="frequency" wx:if="{{item.status==1&&item.card_type==1}}">
  20. <text class="usedTimes">{{item.used_num}}</text>
  21. <text class="totalFrequency">/{{item.total_num}}</text>
  22. </view>
  23. </view>
  24. <view class="beOverdueToUse {{item.day == 0 ? 'hideRight' : ''}}">
  25. <view class="beOverdue {{item.day == 0 ? 'hide' : ''}}">
  26. <text class="beOverdueItem">还有</text>
  27. <text class="beOverdueItem {{item.day < 15 ? 'tips' : ''}}">{{item.day}}天</text>
  28. <text class="beOverdueItem">({{item.expir_date}})过期</text>
  29. </view>
  30. <!-- <view class="toUse" catchtap="jumpProject" data-id="{{item.id}}" data-project_id="{{item.project_id}}" wx:if="{{item.status==1}}">去使用</view> -->
  31. <view class="toUse finish" wx:if="{{item.status==0}}">已使用</view>
  32. <view class="toUse finish" wx:if="{{item.status==-1}}">已过期</view>
  33. <view class="toUse finish" wx:if="{{item.status==-2}}">已注销</view>
  34. </view>
  35. </view>
  36. <view class="cardBg">
  37. <image src="{{item.status!=1?'https://we-spa.oss-cn-shenzhen.aliyuncs.com/wxapp/20220610/de_icon.png':'https://we-spa.oss-cn-shenzhen.aliyuncs.com/wxapp/20220610/cardBg.png'}}"></image>
  38. </view>
  39. </view>
  40. <view class="loading" hidden="{{!loadMore}}">正在载入更多...</view>
  41. <view class="loading" hidden="{{!loadAll}}">已加载全部</view>
  42. <view class="no-data" style="display: {{list.length == 0 ? 'block' : 'none'}};">暂无数据~</view>
  43. </view>
  44. </scroll-view>
  45. <!-- 优惠券页面 -->
  46. <view wx:if="{{current==2}}" class="couponList" wx:for="{{couponList}}" wx:key="index">
  47. <view class="coupon-item {{item.status==1?'used':''||item.status==2?'used':''}}">
  48. <view class="coupon-left">
  49. <!-- 优惠券类型,1直接抵扣券,2满减券,3全额减免券,4卡券 -->
  50. <view class="coupon-type bgc">
  51. {{couponType[item.coupon_type-1]}}
  52. </view>
  53. <view class="coupon-price" wx:if="{{item.coupon_type==3||item.coupon_type==4}}">
  54. 全免
  55. </view>
  56. <view class="coupon-price" wx:else>
  57. <text>¥</text>{{item.price}}
  58. </view>
  59. </view>
  60. <view class="coupon-right">
  61. <view class="coupon-right-top">
  62. <view class="coupon-title">{{item.coupon_name}}</view>
  63. <view class="coupon-condition" wx:if="{{item.coupon_type==2}}">满{{item.full_price}}元可用</view>
  64. </view>
  65. <view class="coupon-right-bottom">
  66. <view class="coupon-time" wx:if="{{item.status==0}}">
  67. 还有<view class="{{item.day<=3?'finaTime':''}}">{{item.day}}天</view>({{item.expir_date}})过期
  68. </view>
  69. <view class="coupon-time" wx:else>
  70. </view>
  71. <view class="coupon-redio" bindtap="goToOrderBy" data-item="{{item}}" wx:if="{{item.status==0}}">
  72. 去使用
  73. </view>
  74. <view class="coupon-redio" wx:if="{{item.status==1}}">
  75. 已使用
  76. </view>
  77. <view class="coupon-redio" wx:if="{{item.status==2}}">
  78. 已过期
  79. </view>
  80. </view>
  81. </view>
  82. </view>
  83. </view>