coupon.wxml 5.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <view class='page'>
  2. <include src='/components/common/common'></include>
  3. <include src='/components/header/header'></include>
  4. <view class='body after-navber'>
  5. <view class='top-bar flex-row'>
  6. <navigator class='flex-grow-1 {{(status == 0?"active":"")}}' openType='redirect'
  7. url='/pages/coupon/coupon?status=0'><text>未使用</text></navigator>
  8. <navigator class='flex-grow-1 {{(status == 1?"active":"")}}' openType='redirect'
  9. url='/pages/coupon/coupon?status=1'><text>已使用</text></navigator>
  10. <navigator class='flex-grow-1 {{(status == 2?"active":"")}}' openType='redirect'
  11. url='/pages/coupon/coupon?status=2'><text>已过期</text></navigator>
  12. </view>
  13. <block wx:if='{{ (list && list.length > 0) }}'>
  14. <view class='coupon-list'>
  15. <block wx:for='{{list}}' wx:for-item='coupon' wx:for-index='index' wx:key='{{item.id}}'>
  16. <view class='coupon-item coupon-status-{{coupon.status}}' style='margin-top:20rpx;'>
  17. <image class='coupon-bg' src='/images/img-coupon-bg-{{(coupon.status == 0?0:1)}}.png'></image>
  18. <block wx:if='{{coupon.status != 0}}'>
  19. <image class='coupon-status-icon' src='/images/img-coupon-status-icon-{{coupon.status}}.png'></image>
  20. </block>
  21. <view class='flex-row' style='height: 100%;overflow: hidden;position:relative'>
  22. <view class='flex-grow-0 flex-col flex-y-center flex-x-center coupon-left'>
  23. <view class='flex-row flex-y-bottom'>
  24. <view class='fs-sm'>¥</view>
  25. <view style='font-size: {{(coupon.sub_price.length > 4?13:19)}}pt;line-height: .9'>
  26. {{coupon.sub_price}} </view>
  27. </view>
  28. <view class='fs-sm' style='margin-top: 10rpx'>{{coupon.min_price_desc}}</view>
  29. </view>
  30. <view class='flex-grow-1 flex-y-center coupon-right'>
  31. <view style='width:100%;'>
  32. <navigator openType='navigateTo'
  33. url='/pages/coupon-detail/coupon-detail?user_coupon_id={{coupon.user_coupon_id}}'>
  34. <view class='flex-row flex-y-center mb-10' style='margin-bottom:5rpx;'>
  35. <view class='flex-grow-1'>{{coupon.event_desc}}</view>
  36. </view>
  37. <view class='fs-sm' style='color: #666666; font-size: 8pt;'>{{coupon.begin_time}} ~
  38. {{coupon.end_time}}</view>
  39. <block wx:if='{{ (coupon.appoint_type == 1 && coupon.cat.length == 0) }}'><text
  40. class='user_coupon_font'>全场通用</text></block>
  41. <block wx:if='{{ (coupon.appoint_type == 2 && coupon.goods.length == 0) }}'><text
  42. class='user_coupon_font'>全场通用</text></block>
  43. <block wx:if='{{coupon.appoint_type == NULL}}'><text class='user_coupon_font'>全场通用</text></block>
  44. </navigator>
  45. <block wx:if='{{ (coupon.appoint_type == 1 && coupon.cat.length > 0) }}'>
  46. <view class='user_coupon_font'
  47. style='overflow: hidden; white-space: nowrap; text-overflow: ellipsis;width:87%;'> 仅限<block
  48. wx:for='{{coupon.cat}}' wx:for-item='cat' wx:for-index='index' wx:key='id'>
  49. <text>{{cat.name}}、</text></block>产品使用 </view>
  50. <block wx:if='{{coupon.cat.length > 2}}'>
  51. <block wx:if='{{index != check}}'>
  52. <image bindtap='xia' class='xia' data-index='{{index}}'
  53. src='{{__wxapp_img.user.coupon_xia.url}}'></image>
  54. </block>
  55. <block wx:if='{{index == check}}'>
  56. <image bindtap='shou' class='xia' data-index='{{index}}' src='{{__wxapp_img.store.shou.url}}'>
  57. </image>
  58. </block>
  59. </block>
  60. </block>
  61. <block wx:if='{{ (coupon.appoint_type == 2 && coupon.goods.length > 0) }}'>
  62. <view bindtap='goodsList' class='user_coupon_font' data-goods_id='{{coupon.goods}}'
  63. data-id='{{coupon.user_coupon_id}}' style='height:50rpx;'>指定商品使用 点进去查看指定商品</view>
  64. </block>
  65. </view>
  66. </view>
  67. </view>
  68. </view>
  69. <block wx:if='{{coupon.cat.length > 2}}'>
  70. <block wx:if='{{check == index}}'>
  71. <view class='user_coupon' style='padding:10rpx 24rpx;background:#fff;'> 仅限<block wx:for='{{coupon.cat}}'
  72. wx:for-item='cat' wx:for-index='index' wx:key='id'><text>{{cat.name}}、</text></block>产品使用 </view>
  73. </block>
  74. </block>
  75. </block>
  76. </view>
  77. </block>
  78. <block wx:else>
  79. <view style='padding-top: 200rpx;color: #888;text-align: center'>暂无相关优惠券</view>
  80. </block>
  81. </view>
  82. <include src='/components/footer/footer'></include>
  83. </view>