index.wxml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <block wx:for="{{diyItems}}" wx:for-item="item" wx:for-index="itemIndex" wx:key="this">
  2. <!-- 搜索框 -->
  3. <block wx:if="{{item.type === 'search'}}">
  4. <diy-search itemIndex="{{ itemIndex }}" itemStyle="{{ item.style }}" params="{{ item.params }}"></diy-search>
  5. </block>
  6. <!-- banner轮播 -->
  7. <block wx:if="{{item.type === 'banner'}}">
  8. <diy-banner itemIndex="{{ itemIndex }}" itemStyle="{{ item.style }}" params="{{ item.params }}" dataList="{{ item.data }}"></diy-banner>
  9. </block>
  10. <!-- 单图组 -->
  11. <block wx:if="{{item.type === 'imageSingle'}}">
  12. <diy-imageSingle itemIndex="{{ itemIndex }}" itemStyle="{{ item.style }}" dataList="{{ item.data }}"></diy-imageSingle>
  13. </block>
  14. <!-- 视频组 -->
  15. <block wx:if="{{item.type === 'video'}}">
  16. <diy-video itemIndex="{{ itemIndex }}" itemStyle="{{ item.style }}" params="{{ item.params }}"></diy-video>
  17. </block>
  18. <!-- 文章组 -->
  19. <block wx:if="{{item.type === 'article'}}">
  20. <diy-article itemIndex="{{ itemIndex }}" params="{{ item.params }}" dataList="{{ item.data }}"></diy-article>
  21. </block>
  22. <!-- 头条快报 -->
  23. <block wx:if="{{item.type === 'special'}}">
  24. <diy-special itemIndex="{{ itemIndex }}" itemStyle="{{ item.style }}" params="{{ item.params }}" dataList="{{ item.data }}"></diy-special>
  25. </block>
  26. <!-- 公告组 -->
  27. <block wx:if="{{item.type === 'notice'}}">
  28. <diy-notice itemIndex="{{ itemIndex }}" itemStyle="{{ item.style }}" params="{{ item.params }}"></diy-notice>
  29. </block>
  30. <!-- 空白组 -->
  31. <block wx:if="{{item.type === 'blank'}}">
  32. <diy-blank itemIndex="{{ itemIndex }}" itemStyle="{{ item.style }}"></diy-blank>
  33. </block>
  34. <!-- 辅助线 -->
  35. <block wx:if="{{item.type === 'guide'}}">
  36. <diy-guide itemIndex="{{ itemIndex }}" itemStyle="{{ item.style }}"></diy-guide>
  37. </block>
  38. <!-- 在线客服 -->
  39. <block wx:if="{{item.type === 'service'}}">
  40. <diy-service itemIndex="{{ itemIndex }}" itemStyle="{{ item.style }}" params="{{ item.params }}"></diy-service>
  41. </block>
  42. <!-- 富文本 -->
  43. <block wx:if="{{item.type === 'richText'}}">
  44. <diy-richText itemIndex="{{ itemIndex }}" itemStyle="{{ item.style }}" params="{{ item.params }}"></diy-richText>
  45. </block>
  46. <!-- 导航组 -->
  47. <block wx:if="{{item.type === 'navBar'}}">
  48. <diy-navBar itemIndex="{{ itemIndex }}" itemStyle="{{ item.style }}" dataList="{{ item.data }}"></diy-navBar>
  49. </block>
  50. <!-- 图片橱窗 -->
  51. <block wx:if="{{item.type === 'window'}}">
  52. <diy-window itemIndex="{{ itemIndex }}" itemStyle="{{ item.style }}" dataList="{{ item.data }}"></diy-window>
  53. </block>
  54. <!-- 商品组 -->
  55. <block wx:if="{{item.type === 'goods'}}">
  56. <diy-goods itemIndex="{{ itemIndex }}" itemStyle="{{ item.style }}" dataList="{{ item.data }}"></diy-goods>
  57. </block>
  58. <!-- 优惠券组 -->
  59. <block wx:if="{{item.type === 'coupon'}}">
  60. <diy-coupon itemIndex="{{ itemIndex }}" itemStyle="{{ item.style }}" dataList="{{ item.data }}"></diy-coupon>
  61. </block>
  62. <!-- 拼团商品 -->
  63. <block wx:if="{{item.type === 'sharingGoods'}}">
  64. <diy-sharingGoods itemIndex="{{ itemIndex }}" itemStyle="{{ item.style }}" dataList="{{ item.data }}"></diy-sharingGoods>
  65. </block>
  66. <!-- 砍价商品 -->
  67. <block wx:if="{{item.type === 'bargainGoods'}}">
  68. <diy-bargainGoods itemIndex="{{ itemIndex }}" itemStyle="{{ item.style }}" dataList="{{ item.data }}"></diy-bargainGoods>
  69. </block>
  70. <!-- 秒杀商品 -->
  71. <block wx:if="{{item.type === 'sharpGoods'}}">
  72. <diy-sharpGoods itemIndex="{{ itemIndex }}" itemStyle="{{ item.style }}" data="{{ item.data }}"></diy-sharpGoods>
  73. </block>
  74. <!-- 线下门店 -->
  75. <block wx:if="{{item.type === 'shop'}}">
  76. <diy-shop itemIndex="{{ itemIndex }}" itemStyle="{{ item.style }}" dataList="{{ item.data }}"></diy-shop>
  77. </block>
  78. <!-- 关注公众号 -->
  79. <block wx:if="{{ item.type === 'officialAccount' }}">
  80. <diy-officialAccount itemIndex="{{ itemIndex }}" itemStyle="{{ item.style }}" dataList="{{ item.data }}"></diy-officialAccount>
  81. </block>
  82. </block>