瀏覽代碼

Merge branch '2025北京诚祥' of https://gogs.mtavip.com/wangguoyu/uniProject into 2025北京诚祥

tanxue 2 月之前
父節點
當前提交
3d7fe2453e
共有 3 個文件被更改,包括 20 次插入15 次删除
  1. 1 1
      pages/admin/Kecheng/study.vue
  2. 7 4
      pages/client/Kecheng/study.vue
  3. 12 10
      pages/client/ShouYe/shouye.vue

+ 1 - 1
pages/admin/Kecheng/study.vue

@@ -6,7 +6,7 @@
 		</view>
 		<!-- 播放器 -->
 		<videoPlayVue ref="videoRef" class="phone-video-box" v-if="kechengFlag"></videoPlayVue>
-		<view v-else class="phone-video-box" style="background-color: #333;"></view>
+		<view v-else class="phone-video-box master-image"></view>
 		<!-- 中间区域 -->
 		<view class="kc-info-box">
 			<view>时长:{{period}}分钟</view>

+ 7 - 4
pages/client/Kecheng/study.vue

@@ -5,8 +5,10 @@
 			<text class="nav-bar-title">{{name}}</text>
 		</view> -->
 		<!-- 播放器 -->
-		<videoPlayVue ref="videoRef" class="phone-video-box" @play-end="onPlayEnd" @play-play="onPlay"
+		<videoPlayVue v-if="showVideo" ref="videoRef" class="phone-video-box" @play-end="onPlayEnd" @play-play="onPlay"
 			@play-pause="onPause" @play-timeupdate="onTimeupdate"></videoPlayVue>
+			<!-- 视频背景图 -->
+		<view v-else class="phone-video-box master-image"></view>
 		<!-- 中间区域 -->
 		<view class="kc-name-box">
 			<icon @click="goUpPage"></icon>
@@ -64,6 +66,7 @@
 		},
 		data() {
 			return {
+				showVideo: false,
 				items: ['目录', '介绍'],
 				colors: ['#007aff', '#4cd964', '#dd524d'],
 				activeColor: '#3fd2a1',
@@ -173,6 +176,7 @@
 				return data;
 			},
 			handlePlay(data) {
+				this.showVideo = true;
 				if (this.curPlayData && this.curPlayData.url == data.url) {
 					return;
 				}
@@ -188,7 +192,6 @@
 				sectionPage.kjId = data.kjId;
 				sectionPage.operId = this.operId;
 				saveKechengSectionPage(this.operId, sectionPage)
-				
 				kechengApi.getVideoAuth({
 					videoId: data.url
 				}).then(res => {
@@ -218,7 +221,7 @@
 					this.list[zhangIndex].jieList[jieIndex].open = true;
 					
 					const kejian = this.list[0].jieList && this.list[zhangIndex].jieList[jieIndex].kejianList.find(item => item.kjId ==sectionPage.kjId )
-					this.handlePlay(kejian)
+					// this.handlePlay(kejian)
 				} else {
 					if (this.list && this.list[0].jieList && this.list[0].jieList[0].kejianList) {
 						// 设置默认展开项
@@ -226,7 +229,7 @@
 						this.list[0].jieList[0].open = true;
 						// 设置播放可见
 						const kejian = this.list[0].jieList[0].kejianList[0];
-						this.handlePlay(kejian)
+						// this.handlePlay(kejian)
 						// 更新缓存
 						sectionPage = {
 							kjId: kejian.kjId,

+ 12 - 10
pages/client/ShouYe/shouye.vue

@@ -3,19 +3,21 @@
 		<!-- <view class="icon-title-bjcolor-navBar-box">
 			<text class="nav-bar-title">{{data.realName}}</text>
 		</view> -->
-		<view class="default-img-box">
+	
+		<template v-if="data.kaoshiList.length&&data.lianxiList.length&&data.kechengList.length">
+			<!-- 考试 -->
+			<kaoshiCardVue v-if="data.kaoshiList.length" :data="{ count: data.kaoshiCount, ...data.kaoshiList[0] }"></kaoshiCardVue>
+			<!-- 练习 -->
+			<lianxiCardVue v-if="data.lianxiList.length"  :data="{ count: data.lianxiCount,...data.lianxiList[0] }"></lianxiCardVue>
+			<!-- 课程 -->
+			<kechengCardVue v-if="data.kechengList.length"   :data="{ count: data.kechengCount,...data.kechengList[0] }"></kechengCardVue>
+			<!-- 底部区域 -->
+			<customTabbarClient :currentTab="0"></customTabbarClient>
+		</template>
+		<view class="default-img-box" v-else>
 			<icon></icon>
 			<text>没有可培训的内容...</text>
 		</view>
-		
-		<!-- 考试 -->
-		<kaoshiCardVue v-if="data.kaoshiList.length" :data="{ count: data.kaoshiCount, ...data.kaoshiList[0] }"></kaoshiCardVue>
-		<!-- 练习 -->
-		<lianxiCardVue v-if="data.lianxiList.length"  :data="{ count: data.lianxiCount,...data.lianxiList[0] }"></lianxiCardVue>
-		<!-- 课程 -->
-		<kechengCardVue v-if="data.kechengList.length"   :data="{ count: data.kechengCount,...data.kechengList[0] }"></kechengCardVue>
-		<!-- 底部区域 -->
-		<customTabbarClient :currentTab="0"></customTabbarClient>
 	</view>
 </template>