123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267 |
- <template>
- <view>
- <view class="page-content clearfix" v-for="(page, index) in pageFloorList" :key="index">
- <view class="tui-group-name" v-if="page.floorContent">
- <view class="tui-group-title">
- <view class="tui-group-l">{{ page.title }}</view>
- <view class="tui-group-r" v-if="showMore(page)" @click="NavToDetailPage(page)">
- <text>更多</text>
- <text class="iconfont icon-xiayibu"></text>
- </view>
- </view>
- <view class="tui-sub__desc">{{ page.detail }}</view>
- </view>
- <!-- 图文模板 -->
- <template v-if="page.floorContent.templateType == '3'">
- <articleA :pageData="page" :userIdentity="userIdentity"></articleA>
- </template>
- <template v-if="page.floorContent.templateType == '4'">
- <articleB :pageData="page" :userIdentity="userIdentity"></articleB>
- </template>
- <template v-if="page.floorContent.templateType == '5'">
- <articleC :pageData="page" :userIdentity="userIdentity"></articleC>
- </template>
- <template v-if="page.floorContent.templateType == '6'">
- <articleD :pageData="page" :userIdentity="userIdentity"></articleD>
- </template>
- <!-- 图片模板 -->
- <template v-if="page.floorContent.templateType == '1'">
- <pictureA :pageData="page" :userIdentity="userIdentity"></pictureA>
- </template>
- <template v-if="page.floorContent.templateType == '2'">
- <pictureB :pageData="page" :userIdentity="userIdentity"></pictureB>
- </template>
- <template v-if="page.floorContent.templateType == '7'">
- <pictureC :pageData="page" :userIdentity="userIdentity"></pictureC>
- </template>
- <template v-if="page.floorContent.templateType == '8'">
- <pictureD :pageData="page" :userIdentity="userIdentity"></pictureD>
- </template>
- <template v-if="page.floorContent.templateType == '9'">
- <pictureE :pageData="page" :userIdentity="userIdentity"></pictureE>
- </template>
- <template v-if="page.floorContent.templateType == '10'">
- <pictureF :pageData="page" :userIdentity="userIdentity"></pictureF>
- </template>
- <!-- 产品模板 -->
- <template v-if="page.floorContent.templateType == '11'">
- <productI :pageData="page" :userIdentity="userIdentity"></productI>
- </template>
- <template v-if="page.floorContent.templateType == '12'">
- <productJ :pageData="page" :userIdentity="userIdentity"></productJ>
- </template>
- <template v-if="page.floorContent.templateType == '13'">
- <productK :pageData="page" :userIdentity="userIdentity"></productK>
- </template>
- <template v-if="page.floorContent.templateType == '14'">
- <productG :pageData="page" :userIdentity="userIdentity"></productG>
- </template>
- <template v-if="page.floorContent.templateType == '15'">
- <productD :pageData="page" :userIdentity="userIdentity"></productD>
- </template>
- <template v-if="page.floorContent.templateType == '16'">
- <productC :pageData="page" :userIdentity="userIdentity"></productC>
- </template>
- <template v-if="page.floorContent.templateType == '17'">
- <productB :pageData="page" :userIdentity="userIdentity"></productB>
- </template>
- <template v-if="page.floorContent.templateType == '18'">
- <productA :pageData="page" :userIdentity="userIdentity"></productA>
- </template>
- <template v-if="page.floorContent.templateType == '19'">
- <productE :pageData="page" :userIdentity="userIdentity"></productE>
- </template>
- <template v-if="page.floorContent.templateType == '20'">
- <productF :pageData="page" :userIdentity="userIdentity"></productF>
- </template>
- <template v-if="page.floorContent.templateType == '21'">
- <productH :pageData="page" :userIdentity="userIdentity"></productH>
- </template>
- <!-- 直播模板 -->
- <template v-if="page.floorContent.templateType == '22'">
- <liveA :pageData="page" :userIdentity="userIdentity"></liveA>
- </template>
- <template v-if="page.floorContent.templateType == '23'">
- <liveC :pageData="page" :userIdentity="userIdentity"></liveC>
- </template>
- <template v-if="page.floorContent.templateType == '24'">
- <liveA :pageData="page" :userIdentity="userIdentity"></liveA>
- </template>
- <template v-if="page.floorContent.templateType == '25'">
- <liveB :pageData="page" :userIdentity="userIdentity"></liveB>
- </template>
- <!-- 视频模板 -->
- <template v-if="isTemplate(['26', '30'], page)">
- <videoA :pageData="page" :userIdentity="userIdentity"></videoA>
- </template>
- <template v-if="isTemplate(['27', '31'], page)">
- <videoB :pageData="page" :userIdentity="userIdentity"></videoB>
- </template>
- <template v-if="isTemplate(['28', '32'], page)">
- <videoC :pageData="page" :userIdentity="userIdentity"></videoC>
- </template>
- <template v-if="isTemplate(['29', '33'], page)">
- <videoD :pageData="page" :userIdentity="userIdentity"></videoD>
- </template>
- </view>
- </view>
- </template>
- <script>
- //引入产品模板
- import productA from './template-page/templateA.vue'
- import productB from './template-page/templateB.vue'
- import productC from './template-page/templateC.vue'
- import productD from './template-page/templateD.vue'
- import productE from './template-page/templateE.vue'
- import productF from './template-page/templateF.vue'
- import productG from './template-page/templateG.vue'
- import productH from './template-page/templateH.vue'
- import productI from './template-page/templateI.vue'
- import productJ from './template-page/templateJ.vue'
- import productK from './template-page/templateK.vue'
- //引入图片模板
- import pictureA from './template-picture/templateA.vue'
- import pictureB from './template-picture/templateB.vue'
- import pictureC from './template-picture/templateC.vue'
- import pictureD from './template-picture/templateD.vue'
- import pictureE from './template-picture/templateE.vue'
- import pictureF from './template-picture/templateF.vue'
- //引入图文模板
- import articleA from './template-article/templateA.vue'
- import articleB from './template-article/templateB.vue'
- import articleC from './template-article/templateC.vue'
- import articleD from './template-article/templateD.vue'
- // 直播楼层模板
- import liveA from './template-live/templateA.vue'
- import liveB from './template-live/templateB.vue'
- import liveC from './template-live/templateC.vue'
- // 视频模板
- import videoA from './template-video/templateA.vue'
- import videoB from './template-video/templateB.vue'
- import videoC from './template-video/templateC.vue'
- import videoD from './template-video/templateD.vue'
- export default {
- name: 'pageFloor',
- components: {
- productA,
- productB,
- productC,
- productD,
- productE,
- productF,
- productG,
- productH,
- productI,
- productJ,
- productK,
- pictureA,
- pictureB,
- pictureC,
- pictureD,
- pictureE,
- pictureF,
- articleA,
- articleB,
- articleC,
- articleD,
- liveA,
- liveC,
- liveB,
- videoA,
- videoB,
- videoC,
- videoD
- },
- props: {
- list: {
- type: Array
- },
- pageType: {
- type: Number
- },
- userIdentity: {
- type: Number
- }
- },
- data() {
- return {
- pageFloorList: [],
- isSwiperTemp: ['1', '2', '9', '21', '5', '7', '22', '23', '24', '25', '27', '32']
- }
- },
- created() {
- this.initData(this.list)
- },
- methods: {
- initData(data) {
- this.pageFloorList = data
- console.log(this.pageFloorList)
- },
- NavToDetailPage(page) {
- //跳转
- this.$api.navigateTo(
- `/pages/h5/activity/activity-floorMore?pageType=${this.pageType}&floorId=${page.id}&title=${page.title}`
- )
- },
- showMore(page) {
- // if(page.floorContent.templateType)
- if (page.floorContent.templateType == 10) {
- if (page.floorImageList.length <= 1) {
- return false
- }
- }
- return !this.isSwiperTemp.includes(page.floorContent.templateType)
- },
- isTemplate(temp = [], page) {
- const templateType = page?.floorContent?.templateType
- return templateType && temp.includes(templateType)
- }
- }
- }
- </script>
- <style lang="scss">
- .page-content {
- width: 100%;
- height: auto;
- box-sizing: border-box;
- padding: 0 24rpx;
- float: left;
- }
- .tui-group-name {
- width: 100%;
- height: 92rpx;
- padding: 20rpx 0;
- }
- .tui-group-title {
- width: 100%;
- float: left;
- .tui-group-l {
- float: left;
- font-size: 30rpx;
- font-weight: bold;
- text-align: left;
- line-height: 49rpx;
- color: #333;
- }
- .tui-group-r {
- float: right;
- font-size: 25rpx;
- text-align: right;
- line-height: 49rpx;
- color: #999999;
- .icon-xiayibu {
- font-size: $font-size-30;
- color: #999999;
- }
- }
- }
- .tui-sub__desc {
- width: 100%;
- float: left;
- color: rgba(153, 153, 153, 0.9);
- font-size: $font-size-26;
- }
- </style>
|