active-floor.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  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 '@/components/cm-module/pageTemplate/templateA.vue'
  112. import productB from '@/components/cm-module/pageTemplate/templateB.vue'
  113. import productC from '@/components/cm-module/pageTemplate/templateC.vue'
  114. import productD from '@/components/cm-module/pageTemplate/templateD.vue'
  115. import productE from '@/components/cm-module/pageTemplate/templateE.vue'
  116. import productF from '@/components/cm-module/pageTemplate/templateF.vue'
  117. import productG from '@/components/cm-module/pageTemplate/templateG.vue'
  118. import productH from '@/components/cm-module/pageTemplate/templateH.vue'
  119. import productI from '@/components/cm-module/pageTemplate/templateI.vue'
  120. import productJ from '@/components/cm-module/pageTemplate/templateJ.vue'
  121. import productK from '@/components/cm-module/pageTemplate/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. import pictureG from './template-picture/templateG.vue'
  130. import pictureH from './template-picture/templateH.vue'
  131. //引入图文模板
  132. import articleA from './template-article/templateA.vue'
  133. import articleB from './template-article/templateB.vue'
  134. import articleC from './template-article/templateC.vue'
  135. import articleD from './template-article/templateD.vue'
  136. // 直播楼层模板
  137. import liveA from './template-live/templateA.vue'
  138. import liveB from './template-live/templateB.vue'
  139. import liveC from './template-live/templateC.vue'
  140. // 视频模板
  141. import videoA from './template-video/templateA.vue'
  142. import videoB from './template-video/templateB.vue'
  143. import videoC from './template-video/templateC.vue'
  144. import videoD from './template-video/templateD.vue'
  145. export default {
  146. name: 'pageFloor',
  147. components: {
  148. productA,
  149. productB,
  150. productC,
  151. productD,
  152. productE,
  153. productF,
  154. productG,
  155. productH,
  156. productI,
  157. productJ,
  158. productK,
  159. pictureA,
  160. pictureB,
  161. pictureC,
  162. pictureD,
  163. pictureE,
  164. pictureF,
  165. pictureG,
  166. pictureH,
  167. articleA,
  168. articleB,
  169. articleC,
  170. articleD,
  171. liveA,
  172. liveC,
  173. liveB,
  174. videoA,
  175. videoB,
  176. videoC,
  177. videoD
  178. },
  179. props: {
  180. list: {
  181. type: Array
  182. },
  183. pageType: {
  184. type: Number
  185. },
  186. userIdentity: {
  187. type: Number
  188. }
  189. },
  190. data() {
  191. return {
  192. pageFloorList: [],
  193. isSwiperTemp: ['1', '2', '9', '21', '5', '7', '22', '23', '24', '25', '27', '32']
  194. }
  195. },
  196. created() {
  197. this.initData(this.list)
  198. },
  199. methods: {
  200. initData(data) {
  201. this.pageFloorList = data
  202. },
  203. NavToDetailPage(page) {
  204. //跳转
  205. this.$api.navigateTo(
  206. `/pages/h5/activity/activity-floorMore?pageType=${this.pageType}&floorId=${page.id}&title=${page.title}`
  207. )
  208. },
  209. showMore(page) {
  210. // if(page.floorContent.templateType)
  211. if (page.floorContent.templateType == 10) {
  212. if (page.floorImageList.length <= 1) {
  213. return false
  214. }
  215. }
  216. return !this.isSwiperTemp.includes(page.floorContent.templateType)
  217. },
  218. isTemplate(temp = [], page) {
  219. const templateType = page?.floorContent?.templateType
  220. return templateType && temp.includes(templateType)
  221. }
  222. }
  223. }
  224. </script>
  225. <style lang="scss">
  226. .page-content {
  227. background-color: #f7f7f7;
  228. width: 100%;
  229. height: auto;
  230. box-sizing: border-box;
  231. padding: 0 24rpx;
  232. float: left;
  233. }
  234. .tui-group-name {
  235. width: 100%;
  236. height: 92rpx;
  237. padding: 20rpx 0;
  238. }
  239. .tui-group-title {
  240. width: 100%;
  241. float: left;
  242. .tui-group-l {
  243. float: left;
  244. font-size: 34rpx;
  245. font-weight: bold;
  246. text-align: left;
  247. line-height: 49rpx;
  248. color: #333;
  249. }
  250. .tui-group-r {
  251. float: right;
  252. font-size: $font-size-26;
  253. text-align: right;
  254. line-height: 49rpx;
  255. color: #999999;
  256. .icon-xiayibu {
  257. font-size: $font-size-30;
  258. color: #999999;
  259. }
  260. }
  261. }
  262. .tui-sub__desc {
  263. width: 100%;
  264. float: left;
  265. color: rgba(153, 153, 153, 0.9);
  266. font-size: $font-size-26;
  267. }
  268. </style>