Browse Source

Signed-off-by: liuboyan <632697560@qq.com>
1

liuboyan 4 years ago
parent
commit
8d3f911fea
1 changed files with 17 additions and 3 deletions
  1. 17 3
      pagesMember/classDetail.vue

+ 17 - 3
pagesMember/classDetail.vue

@@ -32,10 +32,13 @@
 				</u-read-more>
 			</view>
 		</u-card>
-		<u-card title="班级展示" sub-title="查看更多" :show-foot="false" title-size="32" margin="0px" :head-style="cardStyle">
+		<u-card title="班级近况" :show-foot="false" title-size="32" margin="0px" :head-style="cardStyle">
 			<view class="class-show-box" slot="body">
 				<view v-for="(item, index) in classInfo.showList" :key="index" class="class-show-card">
-					<u-image :src="item.url" mode="aspectFill" height="30vw" border-radius="10px"></u-image>
+					<u-image :src="item.url" mode="aspectFill" height="30vw" border-radius="10px" v-if="item.type == 0"></u-image>
+					<view class="video-col" v-if="item.type == 1">
+						<video :src="item.url" object-fit="cover" controls :id="'video' + index"></video>
+					</view>
 					<view class="class-show-name">{{item.name}}</view>
 				</view>
 			</view>
@@ -279,12 +282,23 @@
 					font-size: 14px;
 					margin-top: 5px;
 				}
+
+				.video-col {
+					width: 100%;
+					height: 30vw;
+					border-radius: 10px;
+
+					video {
+						width: 100%;
+						height: 30vw;
+					}
+				}
 			}
 		}
 
 		.handle-fix-box {
 			u-button {
-				width: 50%;
+				width: 100%;
 				display: inline-block;
 			}
 		}