coupon-subsidy.wxml 4.3 KB

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