diy.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <template>
  2. <view>
  3. <block v-for="(item,index) in diyItems" :key="index">
  4. <!--搜索框-->
  5. <!-- <template v-if="item.type==='search'">
  6. <search :itemData="item"></search>
  7. </template> -->
  8. <!--轮播图-->
  9. <template v-if="item.type==='banner'&&item.data!=null">
  10. <banner :itemData="item"></banner>
  11. </template>
  12. <!--单组图-->
  13. <template v-if="item.type==='imageSingle'&&item.data!=null">
  14. <imagesingle :itemData="item"></imagesingle>
  15. </template>
  16. <!-- 橱窗-->
  17. <template v-if="item.type == 'window'&&item.data!=null">
  18. <windows :itemData="item"></windows>
  19. </template>
  20. <!-- 视频组-->
  21. <template v-if="item.type == 'video'">
  22. <videos :itemData="item"></videos>
  23. </template>
  24. <!--文章-->
  25. <template v-if="item.type == 'article'&&item.data!=null">
  26. <articles :itemData="item"></articles>
  27. </template>
  28. <!--头条快报-->
  29. <template v-if="item.type == 'special'&&item.data!=null">
  30. <special :itemData="item"></special>
  31. </template>
  32. <!--公告组-->
  33. <template v-if="item.type == 'notice'">
  34. <notice :itemData="item"></notice>
  35. </template>
  36. <!--标题组-->
  37. <template v-if="item.type == 'title'">
  38. <titles :itemData="item"></titles>
  39. </template>
  40. <!--导航组-->
  41. <template v-if="item.type==='navBar'&&item.data!=null">
  42. <navBar :itemData="item"></navBar>
  43. </template>
  44. <!--商品组-->
  45. <template v-if="item.type==='product'&&item.data!=null">
  46. <product :itemData="item"></product>
  47. </template>
  48. <!--优惠券-->
  49. <template v-if="item.type==='coupon'&&item.data!=null">
  50. <coupon :itemData="item"></coupon>
  51. </template>
  52. <!--门店-->
  53. <template v-if="item.type == 'store'&&item.data!=null">
  54. <store :itemData="item"></store>
  55. </template>
  56. <!--客服-->
  57. <template v-if="item.type == 'service'">
  58. <service :itemData="item"></service>
  59. </template>
  60. <!--富文本-->
  61. <template v-if="item.type==='richText'">
  62. <richText :itemData="item"></richText>
  63. </template>
  64. <!--辅助空白-->
  65. <template v-if="item.type == 'blank'">
  66. <blank :itemData="item"></blank>
  67. </template>
  68. <!--辅助线-->
  69. <template v-if="item.type == 'guide'">
  70. <guide :itemData="item"></guide>
  71. </template>
  72. <!--秒杀-->
  73. <template v-if="item.type == 'seckillProduct'&&item.data!=null">
  74. <seckillProduct :itemData="item"></seckillProduct>
  75. </template>
  76. <!--拼团-->
  77. <template v-if="item.type == 'assembleProduct'&&item.data!=null">
  78. <assembleProduct :itemData="item"></assembleProduct>
  79. </template>
  80. <!--砍价-->
  81. <template v-if="item.type == 'bargainProduct'&&item.data!=null">
  82. <bargainProduct :itemData="item"></bargainProduct>
  83. </template>
  84. <!--微信直播-->
  85. <!-- #ifdef MP-WEIXIN -->
  86. <template v-if="item.type == 'wxlive'&&item.data!=null">
  87. <wxlive :itemData="item"></wxlive>
  88. </template>
  89. <!-- #endif -->
  90. </block>
  91. </view>
  92. </template>
  93. <script>
  94. import search from './search/search';
  95. import banner from './banner/banner';
  96. import imagesingle from './imagesingle/imagesingle';
  97. import windows from './window/window';
  98. import videos from './videos/videos';
  99. import articles from './article/article';
  100. import special from './special/special';
  101. import notice from './notice/notice';
  102. import titles from './title/title';
  103. import coupon from './coupon/coupon';
  104. import richText from './richText/richText';
  105. import navBar from './navBar/navBar';
  106. import store from './store/store';
  107. import service from './service/service';
  108. import blank from './blank/blank';
  109. import guide from './guide/guide';
  110. import product from './product/product';
  111. import seckillProduct from './seckillProduct/seckillProduct';
  112. import assembleProduct from './assembleProduct/assembleProduct';
  113. import bargainProduct from './bargainProduct/bargainProduct';
  114. import wxlive from './wxlive/wxlive';
  115. export default {
  116. components: {
  117. search,
  118. banner,
  119. imagesingle,
  120. windows,
  121. videos,
  122. articles,
  123. special,
  124. notice,
  125. titles,
  126. coupon,
  127. richText,
  128. navBar,
  129. store,
  130. service,
  131. blank,
  132. guide,
  133. product,
  134. seckillProduct,
  135. assembleProduct,
  136. bargainProduct,
  137. wxlive
  138. },
  139. data() {
  140. return {
  141. }
  142. },
  143. props: ['diyItems'],
  144. created() {}
  145. }
  146. </script>
  147. <style>
  148. page{
  149. overflow-x: hidden;
  150. }
  151. </style>