public-view.wxml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <!-- customer-header-view -->
  2. <template name="customer-header-view">
  3. <view class="customer-header-view">
  4. <view>
  5. <text>{{t}}</text>
  6. <text>{{s}}</text>
  7. </view>
  8. <image src="{{src}}"></image>
  9. </view>
  10. </template>
  11. <!-- bottom-view-botton -->
  12. <template name="bottom-view-botton">
  13. <view class="bottom-view{{suffix}}">
  14. <button form-type="{{formT}}" bindtap="{{action}}" hover-class="none" plain="true" style="border-color: rgba(0, 0, 0, 0)">{{t}}</button>
  15. </view>
  16. </template>
  17. <!-- line -->
  18. <template name="right-line">
  19. <view class="right-line">
  20. <view></view>
  21. </view>
  22. </template>
  23. <template name="both-line">
  24. <view class="both-line">
  25. <view></view>
  26. </view>
  27. </template>
  28. <template name="line">
  29. <view class="line">
  30. <view></view>
  31. </view>
  32. </template>
  33. <!-- tips-view -->
  34. <template name="tips-view">
  35. <view class="tips-view">
  36. <view>
  37. <view wx:for="{{t}}" wx:key="">
  38. <view>
  39. <image src="../../../../icon/public/tips_view_d.png" mode="aspectFit"></image>
  40. </view>
  41. <text>{{item}}</text>
  42. </view>
  43. </view>
  44. </view>
  45. </template>
  46. <!-- discount-item -->
  47. <template name="discount-item">
  48. <view class="discount-item" bindtap="chooseAction" id="{{id}}">
  49. <view class="{{(status == 1 && expired == 0) ? 'discount-item-use' : 'discount-item-unuse'}}">
  50. <view>
  51. <text>¥</text>
  52. <text>{{coupon_price}}</text>
  53. </view>
  54. <text>{{p}}</text>
  55. </view>
  56. <view>
  57. <text>{{coupon_name}}</text>
  58. <text>说明:{{coupon_desc}}</text>
  59. <text>有效期至:{{end}}</text>
  60. </view>
  61. <image wx:if="{{type == 'choose'}}" class="discount-choose" src="{{imagePath + tools.getImage(chose, id)}}.png"></image>
  62. <image wx:elif="{{canUse == '1'}}" class="discount-use" src="{{imagePath + 'cash_coupon_right'}}.png"></image>
  63. </view>
  64. </template>
  65. <wxs module="tools">
  66. var getImage = function(a,i) {
  67. return a.indexOf(i) >= 0 ? 'filter_s' : 'filter_n'
  68. }
  69. module.exports.getImage = getImage
  70. </wxs>