coupon-list.wxml 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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='info'>
  6. <view class='info-list' style='width:100%;'>
  7. <block wx:for='{{coupon_list}}' wx:for-item='coupon' wx:for-index='index' wx:key='id'>
  8. <block wx:if='{{coupon.discount_type == 2}}'>
  9. <view class='info-one'>
  10. <block wx:if='{{coupon.is_receive == 0}}'>
  11. <image src='{{__wxapp_img.coupon.enabled.url}}'></image>
  12. </block>
  13. <block wx:if='{{coupon.is_receive == 1}}'>
  14. <image src='{{__wxapp_img.coupon.disabled.url}}'></image>
  15. </block>
  16. <view class='info-content flex-row flex-x-center flex-y-center fs-b'>
  17. <navigator class="info-content" openType='navigateTo' url='/pages/coupon-detail/coupon-detail?coupon_id={{coupon.id}}'>
  18. <view class="couponName">{{coupon.name}}</view>
  19. <view class='flex-row flex-x-center flex-y-center'>
  20. <view class='flex-grow-0'>
  21. <view class='flex-row flex-y-bottom'>
  22. <view class='flex-grow-0'>¥</view>
  23. <view class='flex-grow-1' style='font-size:23pt;'>{{coupon.sub_price}}</view>
  24. </view>
  25. </view>
  26. <view class='flex-grow-1'>
  27. <view style='margin-left:16rpx;'>
  28. <view style='margin-bottom:4rpx;'>优惠券</view>
  29. <view>满{{coupon.min_price}}可用</view>
  30. </view>
  31. </view>
  32. </view>
  33. </navigator>
  34. <view class='flex-grow-0'>
  35. <block wx:if='{{coupon.is_receive == 0}}'>
  36. <view bindtap='receive' class='flex-x-center flex-y-center info-btn fs-sm' data-index='{{coupon.id}}' style='color:#ff4544;'>立即领取</view>
  37. </block>
  38. <block wx:if='{{coupon.is_receive == 1}}'>
  39. <view class='flex-x-center flex-y-center info-btn fs-sm' style='color:#999;'>已领取</view>
  40. </block>
  41. </view>
  42. </view>
  43. <view class='info-footer fs-sm'>
  44. <block wx:if='{{coupon.expire_type == 2}}'>
  45. <view class='info-day'>有效日期:{{coupon.begintime}}-{{coupon.endtime}}</view>
  46. </block>
  47. <block wx:if='{{coupon.expire_type == 1}}'>
  48. <view class='info-day'>有效日期:领取{{coupon.expire_day}}天内有效</view>
  49. </block>
  50. <view>
  51. <block wx:if='{{ (coupon.appoint_type == 2 && coupon.goods.length > 0) }}'>
  52. <view bindtap='goodsList' data-goods='{{coupon.goods}}'>指定商品使用 点进去查看指定商品</view>
  53. </block>
  54. <block wx:else>
  55. <view>{{coupon.content}}</view>
  56. </block>
  57. </view>
  58. </view>
  59. </view>
  60. </block>
  61. </block>
  62. </view>
  63. <block wx:if='{{coupon_list.length <= 0}}'>
  64. <view class='flex-x-center'><text style='margin-top:50rpx;'>暂无优惠券</text></view>
  65. </block>
  66. </view>
  67. </view>
  68. <include src='/components/footer/footer'></include>
  69. <include src='/components/get-coupon/get-coupon.wxml'></include>
  70. </view>