index.wxml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <!--index.wxml-->
  2. <view class="wrap">
  3. <view class="cate_list">
  4. <van-tabs active="{{ status }}" line-width="59rpx" line-height="4rpx" title-active-color="#D54C43" title-inactive-color="#333333" bind:change="onChange">
  5. <van-tab title="全部" name="{{ -1 }}"></van-tab>
  6. <van-tab title="可使用" name="{{ 1 }}"></van-tab>
  7. <van-tab title="已使用" name="{{ 2 }}"></van-tab>
  8. <van-tab title="已失效" name="{{ 0 }}"></van-tab>
  9. </van-tabs>
  10. </view>
  11. <view class="coupon_list">
  12. <view class="{{ item.status == 1 ? 'coupon_item' : 'coupon_item unable' }}" style="background-image: url({{ item.status == 1 ? couponBg : couponUnBg }})" wx:for="{{ dataList }}" wx:key="index">
  13. <view class="item_l" wx:if="{{ item.type == 1 }}">
  14. <view class="price"><text class="unit">¥</text>{{ item.price }}</view>
  15. <view class="tips">满{{ item.base_price }}元可用</view>
  16. </view>
  17. <view class="item_l" wx:if="{{ item.type == 2 }}">
  18. <view class="price"><text class="unit">¥</text>{{ item.price }}</view>
  19. <view class="tips">无门槛</view>
  20. </view>
  21. <view class="item_l" wx:if="{{ item.type == 3 }}">
  22. <view class="price">{{ item.discount }}折</view>
  23. <!-- <view class="tips">折扣{{ item.discount }}</view> -->
  24. </view>
  25. <view class="item_r">
  26. <view class="item_r_l">
  27. <view class="quan_name">{{ item.type == 3 ? '折扣优惠券' : item.type == 2 ? '金额优惠券' : '满减券' }}</view>
  28. <view class="quan_time">有效期至{{ item.due_time }}</view>
  29. </view>
  30. </view>
  31. <view class="item_status" wx:if="{{item.status == 1}}" bind:tap="goGoodsIndex">去使用</view>
  32. <view class="item_status" wx:if="{{item.status == 2}}">已使用</view>
  33. <view class="item_status" wx:if="{{item.status == 0}}">已失效</view>
  34. </view>
  35. <!-- <view class="coupon_item unable" style="background-image: url({{ couponBg }})">
  36. <view class="item_l">
  37. <view class="price"><text class="unit">¥</text>15</view>
  38. <view class="tips">无门槛</view>
  39. </view>
  40. <view class="item_r">
  41. <view class="item_r_l">
  42. <view class="quan_name">新意商城代金券</view>
  43. <view class="quan_time">有效期至2021-12-31</view>
  44. </view>
  45. </view>
  46. <view class="item_status">已使用</view>
  47. </view>-->
  48. </view>
  49. </view>
  50. <!-- loading -->
  51. <!-- <van-overlay show="{{ loading }}" z-index="100">
  52. <van-loading custom-class="custom_loading" />
  53. </van-overlay> -->