cardBag.wxml 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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="conItemTop">
  16. <view class="leftLine {{item.status!=1?'leftLineDe':''}}"></view>
  17. <view class="right">
  18. <view class="titleFrequency">
  19. <view class="title">{{item.name}}</view>
  20. <view class="frequency" wx:if="{{item.status==1&&item.card_type==1}}">
  21. <text class="usedTimes">{{item.used_num}}</text>
  22. <text class="totalFrequency">/{{item.total_num}}</text>
  23. </view>
  24. </view>
  25. <view class="beOverdueToUse {{item.day == 0 ? 'hideRight' : ''}}">
  26. <view class="beOverdue {{item.day == 0 ? 'hide' : ''}}">
  27. <text class="beOverdueItem">还有</text>
  28. <text class="beOverdueItem {{item.day < 15 ? 'tips' : ''}}">{{item.day}}天</text>
  29. <text class="beOverdueItem">({{item.expir_date}})过期</text>
  30. </view>
  31. <!-- <view class="toUse" catchtap="jumpProject" data-id="{{item.id}}" data-project_id="{{item.project_id}}" wx:if="{{item.status==1}}">去使用</view> -->
  32. <view class="toUse finish" wx:if="{{item.status==0}}">已使用</view>
  33. <view class="toUse finish" wx:if="{{item.status==-1}}">已过期</view>
  34. <view class="toUse finish" wx:if="{{item.status==-2}}">已注销</view>
  35. <view class="explainIcon" data-index="{{index}}" catchtap="openExplain">
  36. <image wx:if='{{isExplain&&explainIndex==index}}' src="../../../images/icon_up.png"></image>
  37. <image wx:else src="../../../images/icon_arrow_gray.png"></image>
  38. </view>
  39. </view>
  40. </view>
  41. <view class="cardBg">
  42. <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>
  43. </view>
  44. </view>
  45. <view class="explain" wx:if="{{isExplain&&explainIndex==index}}">
  46. <view>使用说明:</view>
  47. <view>1、请注意,此次卡或优惠券仅在规定的有效期限内有效。过期后将无法使用,请确保在有效期内充分利用。</view>
  48. <view>2、此次卡或优惠券一经使用,将不退款、不找零、不兑换现金。并在使用前确认您的需求。</view>
  49. <view>3、每位顾客仅限本人使用,以确保公平使用,请遵循相关规定。</view>
  50. </view>
  51. </view>
  52. <view class="loading" hidden="{{!loadMore}}">正在载入更多...</view>
  53. <view class="loading" hidden="{{!loadAll}}">已加载全部</view>
  54. <view class="no-data" style="display: {{list.length == 0 ? 'block' : 'none'}};">暂无数据~</view>
  55. </view>
  56. </scroll-view>
  57. <!-- 优惠券页面 -->
  58. <view wx:if="{{current==2}}" class="couponList" wx:for="{{couponList}}" wx:key="index">
  59. <view class="coupon-item {{item.status==1?'used':''||item.status==2?'used':''}}">
  60. <view class="coupon-left">
  61. <!-- 优惠券类型,1直接抵扣券,2满减券,3全额减免券,4卡券 -->
  62. <view class="coupon-type bgc">
  63. {{couponType[item.coupon_type-1]}}
  64. </view>
  65. <view class="coupon-price" wx:if="{{item.coupon_type==3||item.coupon_type==4}}">
  66. 全免
  67. </view>
  68. <view class="coupon-price" wx:else>
  69. <text>¥</text>{{item.price}}
  70. </view>
  71. </view>
  72. <view class="coupon-right">
  73. <view class="coupon-right-top">
  74. <view class="coupon-title">{{item.coupon_name}}</view>
  75. <view class="coupon-condition" wx:if="{{item.coupon_type==2}}">满{{item.full_price}}元可用</view>
  76. </view>
  77. <view class="coupon-right-bottom">
  78. <view class="coupon-time" wx:if="{{item.status==0}}">
  79. 还有<view class="{{item.day<=3?'finaTime':''}}">{{item.day}}天</view>({{item.expir_date}})过期
  80. </view>
  81. <view class="coupon-time" wx:else>
  82. </view>
  83. <view class="coupon-redio" bindtap="goToOrderBy" data-item="{{item}}" wx:if="{{item.status==0}}">
  84. 去使用
  85. </view>
  86. <view class="coupon-redio" wx:if="{{item.status==1}}">
  87. 已使用
  88. </view>
  89. <view class="coupon-redio" wx:if="{{item.status==2}}">
  90. 已过期
  91. </view>
  92. <view class="explainIcon" data-index="{{index}}" catchtap="openExplain">
  93. <image wx:if='{{isExplain&&explainIndex==index}}' src="../../../images/icon_up.png"></image>
  94. <image wx:else src="../../../images/icon_arrow_gray.png"></image>
  95. </view>
  96. </view>
  97. </view>
  98. </view>
  99. <view class="explain" wx:if="{{isExplain&&explainIndex==index}}">
  100. <view>使用说明:</view>
  101. <view>1、请注意,此次卡或优惠券仅在规定的有效期限内有效。过期后将无法使用,请确保在有效期内充分利用。</view>
  102. <view>2、此次卡或优惠券一经使用,将不退款、不找零、不兑换现金。并在使用前确认您的需求。</view>
  103. <view>3、每位顾客仅限本人使用,以确保公平使用,请遵循相关规定。</view>
  104. </view>
  105. </view>