Sfoglia il codice sorgente

美博会页面模板新增

yuwenjun1997 2 anni fa
parent
commit
01a2ea7d10

+ 18 - 5
pages/h5/activity/activity-floorMore.vue

@@ -8,9 +8,9 @@
 				<view class="search-text">{{hotSearchText}}</view>
 			</view>
 		</view>
-		<tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading	="isRequest" :loadingType="5"></tui-skeleton>
+		<!-- <tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading	="isRequest" :loadingType="5"></tui-skeleton> -->
 		<!-- 楼层 -->
-		<view class="container-section tui-skeleton">
+		<view class="container-section">
 			<!-- 图片模板 -->
 			<template v-if="pageData && pageData.floorContent.templateType == '8'">
 				<pictureD :pageData="pageData" :userIdentity="userIdentity" :flag="true" v-if="isRequest"></pictureD>
@@ -65,6 +65,15 @@
             </template>
             <template v-if="pageData && pageData.floorContent.templateType == '29'">
             	<pictureD :pageData="pageData" :userIdentity="userIdentity" :flag="true" v-if="isRequest"></pictureD>
+            </template>
+            <template v-if="pageData && pageData.floorContent.templateType == '30'">
+            	<videoD :pageData="pageData" :userIdentity="userIdentity" :flag="true" v-if="isRequest"></videoD>
+            </template>
+            <template v-if="pageData && pageData.floorContent.templateType == '31'">
+            	<videoD :pageData="pageData" :userIdentity="userIdentity" :flag="true" v-if="isRequest"></videoD>
+            </template>
+            <template v-if="pageData && pageData.floorContent.templateType == '33'">
+            	<videoD :pageData="pageData" :userIdentity="userIdentity" :flag="true" v-if="isRequest"></videoD>
             </template>
 		</view>
 	</view>
@@ -89,6 +98,9 @@
 	import articleA from './components/template-article/templateA.vue'
 	import articleB from './components/template-article/templateB.vue'
 	import articleD from './components/template-article/templateD.vue'
+    // 视频模板
+    import videoD from './components/template-video/templateD.vue'
+    
 	export default{
 		components:{
 			productA,
@@ -104,7 +116,8 @@
 			pictureF,
 			articleA,
 			articleB,
-			articleD
+			articleD,
+            videoD
 		},
 		data(){
 			return{
@@ -190,8 +203,8 @@
 	}
 	.container-section{
 		width: 100%;
-		height: auto;
-		background-color: #F7F7F7;
+		// height: auto;
+		// background-color: #F7F7F7;
 		box-sizing: border-box;
 		padding:24rpx;
 	}

+ 2 - 2
pages/h5/activity/components/active-floor.vue

@@ -192,7 +192,7 @@ export default {
     data() {
         return {
             pageFloorList: [],
-            isSwiperTemp: ['1', '2', '9', '21', '5', '7', '22', '23', '24', '25', '27']
+            isSwiperTemp: ['1', '2', '9', '21', '5', '7', '22', '23', '24', '25', '27', '32']
         }
     },
     created() {
@@ -219,7 +219,7 @@ export default {
         },
         isTemplate(temp = [], page) {
             const templateType = page?.floorContent?.templateType
-            return templateType && temp.includes(id)
+            return templateType && temp.includes(templateType) 
         }
     }
 }

+ 9 - 9
pages/h5/activity/components/template-video/templateA.vue

@@ -1,8 +1,8 @@
 <template>
     <view class="picture">
         <view class="section" v-for="(item, index) in productList" :key="index" @click="navigaitionTo(item)">
-            <image :src="item.appletsImage"></image>
-            <view class="cm-cover" v-if="pageData.floorContent.templateClassify === 4"></view>
+            <image :src="item.appletsImage || item.image"></image>
+            <view class="cm-cover"></view>
         </view>
     </view>
 </template>
@@ -49,13 +49,13 @@ export default {
             }
         },
         navigaitionTo(item) {
-            if (item.adsImage === '' && item.linkType === -1) return
-            if (item.linkType === -1) {
-                const url = `/pages/h5/activity/activity-detail?type=image&adsImage=${item.adsImage}&title=${item.name}`
-                return uni.navigateTo({ url })
-            } else {
-                const url = `/pages/h5/activity/activity-detail?type=video&videoUrl=${item.link}&title=${item.name}`
-                return uni.navigateTo({ url })
+            if (item.link === '' && item.linkType === -1) {
+            	return
+            }else if(item.linkType === -1){
+            	const url = `/pages/h5/activity/activity-detail?type=video&videoUrl=${item.link}&title=${item.name}`
+            	return uni.navigateTo({ url })
+            }else{
+            	caimeiApi.FlooryNavigateTo(item)
             }
         }
     }

+ 5 - 6
pages/h5/activity/components/template-video/templateB.vue

@@ -1,8 +1,8 @@
 <template>
 	<scroll-view scroll-x="true" class="picture">
 		<view class="section" v-for="(item , index) in productList" @click="navigaitionTo(item)" :key="index">
-			<image :src="item.appletsImage" ></image>
-            <view class="cm-cover" v-if="pageData.floorContent.templateClassify === 4"></view>
+			<image :src="item.appletsImage || item.image" ></image>
+            <view class="cm-cover"></view>
 		</view>
 	</scroll-view>
 </template>
@@ -31,12 +31,11 @@ export default{
 			this.productList = data.floorImageList
 		},
 		navigaitionTo(item){
-			if (item.adsImage === '' && item.linkType === -1) {
+			if (item.link === '' && item.linkType === -1) {
 				return
 			}else if(item.linkType === -1){
-				uni.navigateTo({
-					url:`/pages/h5/activity/activity-detail?adsImage=${item.adsImage}&title=${item.name}`
-				})
+				const url = `/pages/h5/activity/activity-detail?type=video&videoUrl=${item.link}&title=${item.name}`
+				return uni.navigateTo({ url })
 			}else{
 				caimeiApi.FlooryNavigateTo(item)
 			}

+ 5 - 6
pages/h5/activity/components/template-video/templateC.vue

@@ -1,8 +1,8 @@
 <template>
 	<view class="picture">
 		<view class="section" v-for="(item,index) in productList" :key="index" @click="navigaitionTo(item)">
-			<image :src="item.appletsImage" ></image>
-            <view class="cm-cover" v-if="pageData.floorContent.templateClassify === 4"></view>
+			<image :src="item.appletsImage || item.image" ></image>
+            <view class="cm-cover"></view>
 		</view>
 	</view>
 </template>
@@ -50,12 +50,11 @@ export default{
 			
 		},
 		navigaitionTo(item){
-			if (item.adsImage === '' && item.linkType === -1) {
+			if (item.link === '' && item.linkType === -1) {
 				return
 			}else if(item.linkType === -1){
-				uni.navigateTo({
-					url:`/pages/h5/activity/activity-detail?adsImage=${item.adsImage}&title=${item.name}`
-				})
+				const url = `/pages/h5/activity/activity-detail?type=video&videoUrl=${item.link}&title=${item.name}`
+				return uni.navigateTo({ url })
 			}else{
 				caimeiApi.FlooryNavigateTo(item)
 			}

+ 5 - 6
pages/h5/activity/components/template-video/templateD.vue

@@ -1,8 +1,8 @@
 <template>
 	<view class="picture">
 		<view class="section" v-for="(item,index) in productList" :key="index" @click="navigaitionTo(item)">
-			<image :src="item.appletsImage" ></image>
-            <view class="cm-cover" v-if="pageData.floorContent.templateClassify === 4"></view>
+			<image :src="item.appletsImage || item.image" ></image>
+            <view class="cm-cover"></view>
 		</view>
 	</view>
 </template>
@@ -50,12 +50,11 @@ export default{
 			
 		},
 		navigaitionTo(item){
-			if (item.adsImage === '' && item.linkType === -1) {
+			if (item.link === '' && item.linkType === -1) {
 				return
 			}else if(item.linkType === -1){
-				uni.navigateTo({
-					url:`/pages/h5/activity/activity-detail?adsImage=${item.adsImage}&title=${item.name}`
-				})
+				const url = `/pages/h5/activity/activity-detail?type=video&videoUrl=${item.link}&title=${item.name}`
+				return uni.navigateTo({ url })
 			}else{
 				caimeiApi.FlooryNavigateTo(item)
 			}