From a3ab3afe580daa80e9689f6e513e75a385f75bac Mon Sep 17 00:00:00 2001
From: inleft <inleft@qq.com>
Date: Sun, 14 Aug 2022 21:00:37 +0800
Subject: [PATCH] 添加视频详情页

---
 src/components/layouts/baseLayout.vue |   41 ++++++++++++++++++++++++++++++++++++++---
 1 files changed, 38 insertions(+), 3 deletions(-)

diff --git a/src/components/layouts/baseLayout.vue b/src/components/layouts/baseLayout.vue
index 55dbd69..af50842 100644
--- a/src/components/layouts/baseLayout.vue
+++ b/src/components/layouts/baseLayout.vue
@@ -6,12 +6,19 @@
 		</a-layout-header>
 
 		<keep-alive>
-			<router-view></router-view>
+			<router-view @showMyVideo="showMyVideo" @detailBackAction="detailBackAction"></router-view>
 		</keep-alive>
-		
+
 		<a-layout-footer>
 			<AplayerBox />
 			<tagFooter />
+			<MyVideo ref="MyVideo" @closeMyVideo="closeMyVideo"/>
+
+			<a-button v-if="miniVideoPlayData!=null && showMiniBox" class="fadeInRight"
+				style="position: fixed;right: 0px;bottom: 130px;" @click="showMyVideo(miniVideoPlayData)">
+				{{miniBoxContent}}
+				<a-icon type="youtube" style="transform: scale(1.5);" />
+			</a-button>
 		</a-layout-footer>
 
 		<a-back-top>
@@ -22,22 +29,50 @@
 </template>
 
 <script>
+	// Dplayer Api地址
+	// http://dplayer.js.org/ 
 	import tagHeader from "../fixed/header.vue"
 	import tagFooter from "../fixed/footer.vue"
 	import AplayerBox from "../mini/Aplayer.vue"
+	import MyVideo from "../group/MyVideo.vue"
 	export default {
 		components: {
 			tagHeader,
 			tagFooter,
 			AplayerBox,
+			MyVideo,
 		},
 		data() {
 			return {
-
+				miniVideoPlayData: null,
+				firstQuery: true,
+				showMiniBox: false,
+				miniBoxContent: "视频盒子",
 			}
 		},
 		methods: {
+			showMyVideo(param) {
+				this.miniVideoPlayData = param;
+				this.$refs.MyVideo.showModal(param);
+			},
+			detailBackAction(param) {
+				this.miniVideoPlayData = param;
+				this.closeMyVideo()
+			},
+			closeMyVideo() {
+				if (this.firstQuery) {
+					this.firstQuery = !this.firstQuery;
+					this.showMiniBox = !this.showMiniBox;
+					this.$notification.info({
+						message: '视频盒子最小化啦..',
+						placement: 'bottomRight',
+					});
 
+					setTimeout(() => {
+						this.miniBoxContent = "";
+					}, 6000);
+				}
+			},
 			// 下载文件
 			down: function() {
 				console.log(111);

--
Gitblit v1.9.1