lilei 2 gadi atpakaļ
vecāks
revīzija
e1e1ff2eaa
3 mainītis faili ar 20 papildinājumiem un 7 dzēšanām
  1. 7 4
      pages/index/index.vue
  2. 8 2
      pages/videos/detail.vue
  3. 5 1
      pagesA/activeDetail/index.vue

+ 7 - 4
pages/index/index.vue

@@ -276,7 +276,8 @@
 									contentType: item.contentType,
 									id: item.id,
 									name: item.name,
-									promoActiveSn: item.promoActiveSn
+									promoActiveSn: item.promoActiveSn,
+									content: item.content
 								})
 							})
 						})
@@ -284,6 +285,7 @@
 				})
 			},
 			pageInit(){
+				this.carouselList = []
 				if(this.hasLogin){
 					// 获取扫描记录
 					this.getVinLog()
@@ -454,6 +456,7 @@
 			// 单击banner
 			clickBanner(index){
 				const row = this.imgList[index]
+				console.log(row)
 				if(row.activeType == 'redPacket'){
 					uni.navigateTo({url:"/pages/morePage/redPacket"})
 				}
@@ -462,12 +465,12 @@
 					uni.navigateTo({url:"/pagesA/activeDetail/index?sn="+row.promoActiveSn})
 				}
 				// 视频
-				if(row.activeType == 'VIDEO'){
+				if(row.contentType == 'VIDEO'){
 					uni.navigateTo({url:"/pages/videos/detail?sn="+row.promoActiveSn})
 				}
 				// 链接
-				if(row.activeType == 'LINK'){
-					openWebView({url:item.content})
+				if(row.contentType == 'LINK'){
+					openWebView({url:row.content})
 				}
 			},
 			// 选择取货方式

+ 8 - 2
pages/videos/detail.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="content" v-if="detail">
 		<view class="acitve-content">
-			<video autoplay :src="content" style="width: 100%;height: 350px;" controls></video>
+			<video autoplay :src="content" controls></video>
 		</view>
 		<view class="titles">{{detail.title}}</view>
 	</view>
@@ -42,15 +42,21 @@
 </script>
 
 <style lang="less">
+	page{
+		padding: 0;
+	}
 	.content{
+		padding: 0;
 		.titles{
 			text-align: center;
 			padding: 20rpx;
-			border-top: 1px solid #eee;
 			font-weight: bold;
 		}
 		.acitve-content{
 			padding: 0;
+			video{
+				width:100%;
+			}
 		}
 	}
 </style>

+ 5 - 1
pagesA/activeDetail/index.vue

@@ -14,7 +14,7 @@
 			return {
 				detail: null,
 				style: {
-					p: ''
+					p: 'margin-bottom:10px;'
 				},
 				promoActiveSn: null
 			}
@@ -30,11 +30,15 @@
 		},
 		methods: {
 			getDetail(){
+				uni.showLoading({
+					title: "正在加载..."
+				})
 				promoTerminalDetail({sn:this.promoActiveSn}).then(res => {
 					this.detail = res.data
 					uni.setNavigationBarTitle({
 						title: res.data.name || '活动内容'
 					})
+					uni.hideLoading()
 				})
 			}
 		}