coupon.wxml 4.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <view class="tabs">
  2. <view class="history" bindtap="goHistory"><text>历史记录</text></view>
  3. <view class="tabs-wrap flex-align-center">
  4. <view class="item flex-center {{current == 0 ? 'active' : ''}}" bindtap="onTabsChange" data-id="0">
  5. 未使用
  6. </view>
  7. <view class="item flex-center {{current == 1 ? 'active' : ''}}" bindtap="onTabsChange" data-id="1">
  8. 使用记录
  9. </view>
  10. <view class="item flex-center {{current == 2 ? 'active' : ''}}" bindtap="onTabsChange" data-id="2">
  11. 已过期
  12. </view>
  13. </view>
  14. <view class="tabs-content">
  15. <!-- <coupon-item class="coupon-item" wx:for="{{ list }}" item="{{item}}" wx:key="index" couponStatus="{{item.status}}" data-item="{{item}}" bind:check="goToOrderBy"></coupon-item> -->
  16. <view class="item flex-column current{{item.status}}" wx:for="{{list2}}" wx:key="index">
  17. <view class="flex" style="background-color: #fff;height: 172rpx;">
  18. <view class="item-left flex-center">
  19. <text class="experience" wx:if="{{item.coupon_type == 3}}">{{item.coupon_name}}</text>
  20. <text class="experience" wx:if="{{item.coupon_type == 1}}">{{item.coupon_name}}</text>
  21. <view class="consume flex-column flex-align-center" wx:if="{{item.coupon_type == 2}}">
  22. <view class="text-box">
  23. <text style="font-family: PingFangSC-Semibold;font-size: 36rpx;margin-right:10rpx">¥</text>
  24. <text style="font-family: PingFangSC-Semibold;font-size: 68rpx;">{{item.price}}</text>
  25. </view>
  26. <text style="font-family: PingFangSC-Semibold;font-size: 28rpx;">满{{item.full_price}}元可用</text>
  27. </view>
  28. </view>
  29. <view class="item-right flex1 flex-align-center">
  30. <view class="item-text flex1 flex-column">
  31. <!-- <text>券码:XH7T390J</text> -->
  32. <text>有效期</text>
  33. <text>{{item.ex_time}}</text>
  34. <!-- <text>{{item.coupon_desc}}</text> -->
  35. <view class="flex flex-align-center" data-index="{{index}}" data-item="{{item}}" bindtap="onChangeDesc">
  36. <text style="color: #FA7D22;font-size: 28rpx;font-family: PingFangSC-Medium, PingFang SC;">详细信息</text>
  37. <view class="triangle {{ item._status ? 'active' : ''}}"></view>
  38. </view>
  39. </view>
  40. <view class="item-btn flex-center" wx:if="{{item.status == 0}}" bindtap="goToOrderBy">
  41. 去使用
  42. </view>
  43. <image src="/images/my/coupon_1.png" wx:if="{{item.status == 1}}"></image>
  44. <image src="/images/my/coupon_0.png" wx:if="{{item.status == 2}}"></image>
  45. </view>
  46. </view>
  47. <!-- wx:if="{{ item._status && item.coupon_desc }}" -->
  48. <view class="item-btm" style="height: {{item.childrenHeight}}px;display: {{ item.coupon_desc ? 'block' : 'none' }};">
  49. <view id="item{{index}}">{{item.coupon_desc}}</view>
  50. </view>
  51. </view>
  52. <view class="no-data" style="display: {{list.length == 0 ? 'block' : 'none'}};">暂无数据~</view>
  53. </view>
  54. </view>
  55. <!-- 优惠券新页面 -->
  56. <view class="couponList" wx:for="{{list}}" wx:key="index">
  57. <view class="coupon-item {{current==1?'used':''||current==2?'used':''}}">
  58. <view class="coupon-left">
  59. <!-- 优惠券类型,1直接抵扣券,2满减券,3全额减免券,4卡券 -->
  60. <view class="coupon-type bgc">
  61. {{couponType[item.coupon_type-1]}}
  62. </view>
  63. <view class="coupon-price" wx:if="{{item.coupon_type==3||item.coupon_type==4}}">
  64. 全免
  65. </view>
  66. <view class="coupon-price" wx:else>
  67. <text>¥</text>{{item.price}}
  68. </view>
  69. </view>
  70. <view class="coupon-right">
  71. <view class="coupon-right-top">
  72. <view class="coupon-title">{{item.coupon_name}}</view>
  73. <view class="coupon-condition" wx:if="{{item.coupon_type==2}}">满{{item.full_price}}元可用</view>
  74. </view>
  75. <view class="coupon-right-bottom">
  76. <view class="coupon-time" wx:if="{{current!=2}}">
  77. 还有<view class="{{item.finaTime<=3&&current!=1?'finaTime':''}}">{{item.finaTime}}天</view>({{item.fina_time}})过期
  78. </view>
  79. <view class="coupon-time" wx:else>
  80. </view>
  81. <view class="coupon-redio" bindtap="goToOrderBy" data-item="{{item}}" wx:if="{{current==0}}">
  82. 去使用
  83. </view>
  84. <view class="coupon-redio" wx:if="{{current==1}}">
  85. 已使用
  86. </view>
  87. <view class="coupon-redio" wx:if="{{current==2}}">
  88. 已过期
  89. </view>
  90. </view>
  91. </view>
  92. </view>
  93. </view>