active-floor.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. <template>
  2. <view>
  3. <view class="page-content clearfix" v-for="(page, index) in pageFloorList" :key="index">
  4. <view class="tui-group-name" v-if="page.floorContent">
  5. <view class="tui-group-title">
  6. <view class="tui-group-l">{{ page.title }}</view>
  7. <view class="tui-group-r" v-if="showMore(page)" @click="NavToDetailPage(page)">
  8. <text>更多</text>
  9. <text class="iconfont icon-xiayibu"></text>
  10. </view>
  11. </view>
  12. <view class="tui-sub__desc">{{ page.detail }}</view>
  13. </view>
  14. <!-- 图文模板 -->
  15. <template v-if="page.floorContent.templateType == '3'">
  16. <articleA :pageData="page" :userIdentity="userIdentity"></articleA>
  17. </template>
  18. <template v-if="page.floorContent.templateType == '4'">
  19. <articleB :pageData="page" :userIdentity="userIdentity"></articleB>
  20. </template>
  21. <template v-if="page.floorContent.templateType == '5'">
  22. <articleC :pageData="page" :userIdentity="userIdentity"></articleC>
  23. </template>
  24. <template v-if="page.floorContent.templateType == '6'">
  25. <articleD :pageData="page" :userIdentity="userIdentity"></articleD>
  26. </template>
  27. <!-- 图片模板 -->
  28. <template v-if="page.floorContent.templateType == '1'">
  29. <pictureA :pageData="page" :userIdentity="userIdentity"></pictureA>
  30. </template>
  31. <template v-if="page.floorContent.templateType == '2'">
  32. <pictureB :pageData="page" :userIdentity="userIdentity"></pictureB>
  33. </template>
  34. <template v-if="page.floorContent.templateType == '7'">
  35. <pictureC :pageData="page" :userIdentity="userIdentity"></pictureC>
  36. </template>
  37. <template v-if="page.floorContent.templateType == '8'">
  38. <pictureD :pageData="page" :userIdentity="userIdentity"></pictureD>
  39. </template>
  40. <template v-if="page.floorContent.templateType == '9'">
  41. <pictureE :pageData="page" :userIdentity="userIdentity"></pictureE>
  42. </template>
  43. <template v-if="page.floorContent.templateType == '10'">
  44. <pictureF :pageData="page" :userIdentity="userIdentity"></pictureF>
  45. </template>
  46. <!-- 产品模板 -->
  47. <template v-if="page.floorContent.templateType == '11'">
  48. <productI :pageData="page" :userIdentity="userIdentity"></productI>
  49. </template>
  50. <template v-if="page.floorContent.templateType == '12'">
  51. <productJ :pageData="page" :userIdentity="userIdentity"></productJ>
  52. </template>
  53. <template v-if="page.floorContent.templateType == '13'">
  54. <productK :pageData="page" :userIdentity="userIdentity"></productK>
  55. </template>
  56. <template v-if="page.floorContent.templateType == '14'">
  57. <productG :pageData="page" :userIdentity="userIdentity"></productG>
  58. </template>
  59. <template v-if="page.floorContent.templateType == '15'">
  60. <productD :pageData="page" :userIdentity="userIdentity"></productD>
  61. </template>
  62. <template v-if="page.floorContent.templateType == '16'">
  63. <productC :pageData="page" :userIdentity="userIdentity"></productC>
  64. </template>
  65. <template v-if="page.floorContent.templateType == '17'">
  66. <productB :pageData="page" :userIdentity="userIdentity"></productB>
  67. </template>
  68. <template v-if="page.floorContent.templateType == '18'">
  69. <productA :pageData="page" :userIdentity="userIdentity"></productA>
  70. </template>
  71. <template v-if="page.floorContent.templateType == '19'">
  72. <productE :pageData="page" :userIdentity="userIdentity"></productE>
  73. </template>
  74. <template v-if="page.floorContent.templateType == '20'">
  75. <productF :pageData="page" :userIdentity="userIdentity"></productF>
  76. </template>
  77. <template v-if="page.floorContent.templateType == '21'">
  78. <productH :pageData="page" :userIdentity="userIdentity"></productH>
  79. </template>
  80. <!-- 直播模板 -->
  81. <template v-if="page.floorContent.templateType == '22'">
  82. <liveA :pageData="page" :userIdentity="userIdentity"></liveA>
  83. </template>
  84. <template v-if="page.floorContent.templateType == '23'">
  85. <liveC :pageData="page" :userIdentity="userIdentity"></liveC>
  86. </template>
  87. <template v-if="page.floorContent.templateType == '24'">
  88. <liveA :pageData="page" :userIdentity="userIdentity"></liveA>
  89. </template>
  90. <template v-if="page.floorContent.templateType == '25'">
  91. <liveB :pageData="page" :userIdentity="userIdentity"></liveB>
  92. </template>
  93. <!-- 视频模板 -->
  94. <template v-if="isTemplate(['26', '30'], page)">
  95. <videoA :pageData="page" :userIdentity="userIdentity"></videoA>
  96. </template>
  97. <template v-if="isTemplate(['27', '31'], page)">
  98. <videoB :pageData="page" :userIdentity="userIdentity"></videoB>
  99. </template>
  100. <template v-if="isTemplate(['28', '32'], page)">
  101. <videoC :pageData="page" :userIdentity="userIdentity"></videoC>
  102. </template>
  103. <template v-if="isTemplate(['29', '33'], page)">
  104. <videoD :pageData="page" :userIdentity="userIdentity"></videoD>
  105. </template>
  106. </view>
  107. </view>
  108. </template>
  109. <script>
  110. //引入产品模板
  111. import productA from './template-page/templateA.vue'
  112. import productB from './template-page/templateB.vue'
  113. import productC from './template-page/templateC.vue'
  114. import productD from './template-page/templateD.vue'
  115. import productE from './template-page/templateE.vue'
  116. import productF from './template-page/templateF.vue'
  117. import productG from './template-page/templateG.vue'
  118. import productH from './template-page/templateH.vue'
  119. import productI from './template-page/templateI.vue'
  120. import productJ from './template-page/templateJ.vue'
  121. import productK from './template-page/templateK.vue'
  122. //引入图片模板
  123. import pictureA from './template-picture/templateA.vue'
  124. import pictureB from './template-picture/templateB.vue'
  125. import pictureC from './template-picture/templateC.vue'
  126. import pictureD from './template-picture/templateD.vue'
  127. import pictureE from './template-picture/templateE.vue'
  128. import pictureF from './template-picture/templateF.vue'
  129. //引入图文模板
  130. import articleA from './template-article/templateA.vue'
  131. import articleB from './template-article/templateB.vue'
  132. import articleC from './template-article/templateC.vue'
  133. import articleD from './template-article/templateD.vue'
  134. // 直播楼层模板
  135. import liveA from './template-live/templateA.vue'
  136. import liveB from './template-live/templateB.vue'
  137. import liveC from './template-live/templateC.vue'
  138. // 视频模板
  139. import videoA from './template-video/templateA.vue'
  140. import videoB from './template-video/templateB.vue'
  141. import videoC from './template-video/templateC.vue'
  142. import videoD from './template-video/templateD.vue'
  143. export default {
  144. name: 'pageFloor',
  145. components: {
  146. productA,
  147. productB,
  148. productC,
  149. productD,
  150. productE,
  151. productF,
  152. productG,
  153. productH,
  154. productI,
  155. productJ,
  156. productK,
  157. pictureA,
  158. pictureB,
  159. pictureC,
  160. pictureD,
  161. pictureE,
  162. pictureF,
  163. articleA,
  164. articleB,
  165. articleC,
  166. articleD,
  167. liveA,
  168. liveC,
  169. liveB,
  170. videoA,
  171. videoB,
  172. videoC,
  173. videoD
  174. },
  175. props: {
  176. list: {
  177. type: Array
  178. },
  179. pageType: {
  180. type: Number
  181. },
  182. userIdentity: {
  183. type: Number
  184. }
  185. },
  186. data() {
  187. return {
  188. pageFloorList: [],
  189. isSwiperTemp: ['1', '2', '9', '21', '5', '7', '22', '23', '24', '25', '27', '32']
  190. }
  191. },
  192. created() {
  193. this.initData(this.list)
  194. },
  195. methods: {
  196. initData(data) {
  197. this.pageFloorList = data
  198. console.log(this.pageFloorList)
  199. },
  200. NavToDetailPage(page) {
  201. //跳转
  202. this.$api.navigateTo(
  203. `/pages/h5/activity/activity-floorMore?pageType=${this.pageType}&floorId=${page.id}&title=${page.title}`
  204. )
  205. },
  206. showMore(page) {
  207. // if(page.floorContent.templateType)
  208. if (page.floorContent.templateType == 10) {
  209. if (page.floorImageList.length <= 1) {
  210. return false
  211. }
  212. }
  213. return !this.isSwiperTemp.includes(page.floorContent.templateType)
  214. },
  215. isTemplate(temp = [], page) {
  216. const templateType = page?.floorContent?.templateType
  217. return templateType && temp.includes(templateType)
  218. }
  219. }
  220. }
  221. </script>
  222. <style lang="scss">
  223. .page-content {
  224. width: 100%;
  225. height: auto;
  226. box-sizing: border-box;
  227. padding: 0 24rpx;
  228. float: left;
  229. }
  230. .tui-group-name {
  231. width: 100%;
  232. height: 92rpx;
  233. padding: 20rpx 0;
  234. }
  235. .tui-group-title {
  236. width: 100%;
  237. float: left;
  238. .tui-group-l {
  239. float: left;
  240. font-size: 30rpx;
  241. font-weight: bold;
  242. text-align: left;
  243. line-height: 49rpx;
  244. color: #333;
  245. }
  246. .tui-group-r {
  247. float: right;
  248. font-size: 25rpx;
  249. text-align: right;
  250. line-height: 49rpx;
  251. color: #999999;
  252. .icon-xiayibu {
  253. font-size: $font-size-30;
  254. color: #999999;
  255. }
  256. }
  257. }
  258. .tui-sub__desc {
  259. width: 100%;
  260. float: left;
  261. color: rgba(153, 153, 153, 0.9);
  262. font-size: $font-size-26;
  263. }
  264. </style>