coupon.wxml 4.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <!-- components/diy-coupon/coupon.wxml -->
  2. <block wx:if="{{column == 'style1'}}">
  3. <view class="one_index" style="width:{{style.width}}%;background:{{style.backgroundColor}};margin:{{style.margin.top * 2}}rpx {{style.margin.right * 2}}rpx {{style.margin.bottom * 2}}rpx {{style.margin.left * 2}}rpx;padding:{{style.padding.top * 2}}rpx {{style.padding.right * 2}}rpx {{style.padding.bottom * 2}}rpx {{style.padding.right * 2}}rpx">
  4. <block wx:for="{{list}}" wx:key="index" wx:for-item="coupon">
  5. <view class="one_info">
  6. <view class="one_left" style="background:{{style.couponBackground}};border-radius:{{style.borderRadius * 2}}rpx;">
  7. <view class="price">
  8. {{coupon.discount}}
  9. <text class="text">元</text>
  10. </view>
  11. <view class="price_right">
  12. <view class="right_title">{{coupon.type}}</view>
  13. <view class="desc">{{coupon.name}}</view>
  14. </view>
  15. </view>
  16. <view class="one_right" bind:tap="coupon" data-coupon="{{coupon.objectId}}" style="background:{{style.couponBackground}};border-radius:{{style.borderRadius * 2}}rpx;">
  17. 领取
  18. </view>
  19. </view>
  20. </block>
  21. </view>
  22. </block>
  23. <block wx:if="{{column == 'style2'}}">
  24. <view class="two_index" style="width:{{style.width}}%;background:{{style.backgroundColor}};margin:{{style.margin.top * 2}}rpx {{style.margin.right * 2}}rpx {{style.margin.bottom * 2}}rpx {{style.margin.left * 2}}rpx;padding:{{style.padding.top * 2}}rpx {{style.padding.right * 2}}rpx {{style.padding.bottom * 2}}rpx {{style.padding.right * 2}}rpx">
  25. <block wx:for="{{list}}" wx:key="index" wx:for-item="coupon">
  26. <view class="two_info" style="background:{{style.couponBackground}};">
  27. <view class="two_left">
  28. <view class="price">
  29. {{coupon.discount}}
  30. <text class="text">元</text>
  31. </view>
  32. <view class="price_right">
  33. <view class="right_title">{{coupon.type}}</view>
  34. <view class="desc">{{coupon.name}}</view>
  35. </view>
  36. </view>
  37. <view class="two_right" bind:tap="coupon" data-coupon="{{coupon.objectId}}">
  38. 领取
  39. </view>
  40. </view>
  41. </block>
  42. </view>
  43. </block>
  44. <block wx:if="{{column == 'style3'}}">
  45. <view class="slid_index" style="width:{{style.width}}%;background:{{style.backgroundColor}};margin:{{style.margin.top * 2}}rpx {{style.margin.right * 2}}rpx {{style.margin.bottom * 2}}rpx {{style.margin.left * 2}}rpx;padding:{{style.padding.top * 2}}rpx {{style.padding.right * 2}}rpx {{style.padding.bottom * 2}}rpx {{style.padding.right * 2}}rpx">
  46. <scroll-view scroll-x="true">
  47. <view class="slid">
  48. <block wx:for="{{list}}" wx:key="index" wx:for-item="coupon">
  49. <view class="slid_info" bind:tap="coupon" data-coupon="{{coupon.objectId}}" style="background:{{style.couponBackground}};border-radius:{{style.borderRadius * 2}}rpx;">
  50. <view class="slid_price">
  51. {{coupon.discount}}
  52. <text class="slid_text">元</text>
  53. </view>
  54. <view class="slid_desc">{{coupon.type}}</view>
  55. </view>
  56. </block>
  57. </view>
  58. </scroll-view>
  59. </view>
  60. </block>
  61. <block wx:if="{{column == 'style4'}}">
  62. <view class="slid_index4" style="width:{{style.width}}%;background:{{style.backgroundColor}};margin:{{style.margin.top * 2}}rpx {{style.margin.right * 2}}rpx {{style.margin.bottom * 2}}rpx {{style.margin.left * 2}}rpx;padding:{{style.padding.top * 2}}rpx {{style.padding.right * 2}}rpx {{style.padding.bottom * 2}}rpx {{style.padding.right * 2}}rpx">
  63. <scroll-view scroll-x="true">
  64. <view class="slid4">
  65. <block wx:for="{{list}}" wx:key="index" wx:for-item="coupon">
  66. <view class="slid_info4" bind:tap="coupon" data-coupon="{{coupon.objectId}}" style="background:{{style.couponBackground}};">
  67. <view class="slid_price4">
  68. {{coupon.discount}}
  69. <text class="slid_text4">元</text>
  70. </view>
  71. <view class="slid_desc4">{{coupon.type}}</view>
  72. </view>
  73. </block>
  74. </view>
  75. </scroll-view>
  76. </view>
  77. </block>