From e33672cf85da88d515d5fe6ccc0a139c3cfaa5db Mon Sep 17 00:00:00 2001
From: zhongshujie <2862698242@qq.com>
Date: 星期四, 28 八月 2025 22:53:54 +0800
Subject: [PATCH] 8.28更新

---
 src/components/bookVideo/index.vue |  260 ++++++++++++++++++++++++---------------------------
 1 files changed, 124 insertions(+), 136 deletions(-)

diff --git a/src/components/bookVideo/index.vue b/src/components/bookVideo/index.vue
index 767331a..2cffe95 100644
--- a/src/components/bookVideo/index.vue
+++ b/src/components/bookVideo/index.vue
@@ -1,30 +1,29 @@
 <template>
-    <div class="knowledgeExpansion" style="">
-        <div class="questionBank-video">
-            <svgIcon icon-file-name="sanJiao" :color="logoColor"></svgIcon>
-            <span :style="{ color: logoColor }">瑙嗛</span>
-        </div>
-
-        <div class="knowledgeExpansion-video">
-            <p class="center text td-0">
-                <video :src="videoPathSrc" webkit-playsinline="true" x-webkit-airplay="true" playsinline="true"
-                    x5-video-orientation="h5" x5-video-player-fullscreen="true" x5-playsinline="" controls
-                    controlslist="nodownload" class="w100 video"></video>
-            </p>
-            <p class="center videoname">
-                <span>{{ videoName }}</span>
-                <el-tooltip class="item" effect="dark" :content="localIsCollectVideo ? '鐐瑰嚮鍙栨秷' : '鐐瑰嚮鏀惰棌'"
-                    placement="top-start">
-                    <svgIcon class="collect-btn " :icon-file-name="collectResourceList.findIndex(
-                        (item) => item.id == videoPath
-                    ) > -1
-                        ? collectCheck
-                        : collectImg
-                        " :color="logoColor" @click="handleCollect()"></svgIcon>
-                </el-tooltip>
-            </p>
-        </div>
-    </div>
+	<div class="knowledgeExpansion theme-color">
+		<div class="questionBank-video">
+			<svgIcon icon-file-name="sanJiao"></svgIcon>
+			<span>瑙嗛</span>
+		</div>
+		<div class="knowledgeExpansion-video">
+			<p class="center text td-0">
+				<video :src="videoPathSrc" webkit-playsinline="true" x-webkit-airplay="true" playsinline="true"
+					x5-video-orientation="h5" x5-video-player-fullscreen="true" x5-playsinline="" controls
+					controlslist="nodownload" class="w100 video"></video>
+			</p>
+			<p class="center videoname">
+				<span>{{ videoName }}</span>
+				<el-tooltip class="item" effect="dark" :content="localIsCollectVideo ? '鐐瑰嚮鍙栨秷' : '鐐瑰嚮鏀惰棌'"
+					placement="top-start">
+					<svgIcon class="collect-btn " :icon-file-name="collectResourceList.findIndex(
+						(item) => item.id == videoPath
+					) > -1
+						? collectCheck
+						: collectImg
+						" @click="handleCollect()"></svgIcon>
+				</el-tooltip>
+			</p>
+		</div>
+	</div>
 </template>
 
 <script>
@@ -32,131 +31,120 @@
 import { getCollectResource, setCollectResource } from "@/assets/methods/resources";
 import svgIcon from "@/components/svgIcon";
 export default {
-    components: {
-        svgIcon
-    },
-    data() {
-        return {
-            collectImg: "heart",
-            collectCheck: "heart-check",
-            videoPathSrc: "",
-            collectResourceList: [],
-            localIsCollectVideo: false,
-            isDisplay: true,
-        };
-    },
-    props: {
-        videoPath: {
-            type: String,
-            required: "",
-        },
-        videoName: {
-            type: String,
-            required: "",// 榛樿鍊�
-        },
-        BookId: {
-            type: String,
-            required: "",// 榛樿鍊�
-        },
-        logoColor: {
-            type: String,
-            required: "#00918e",// 榛樿鍊�
-        },
-    },
-    async mounted() {
-        await this.getVidoePath();
-        this.collectResourceList = await getCollectResource(
-            this.BookId
-        );
-        console.log(this.collectResourceList,"this.collectResourceList");
-        
-    },
-    methods: {
-        async getVidoePath() {
-            this.videoPathSrc = await getResourcePath(
-                this.videoPath
-            );
-        },
+	components: {
+		svgIcon
+	},
+	data() {
+		return {
+			collectImg: "heart",
+			collectCheck: "heart-check",
+			videoPathSrc: "",
+			collectResourceList: [],
+			localIsCollectVideo: false,
+			videoName: this.videoInfo.resourceName
+		};
+	},
+	props: {
+		videoInfo: {
+			type: Object,
+		},
+		BookId: {
+			type: String,
+			required: "",// 榛樿鍊�
+		},
+	},
+	async mounted() {
+		await this.getVidoePath();
+		this.collectResourceList = await getCollectResource(
+			this.BookId
+		);
+	},
+	methods: {
+		async getVidoePath() {
+			this.videoPathSrc = await getResourcePath(
+				this.videoInfo.md5
+			);
+		},
+		handleCollect() {
+			this.handleCollectResource(
+				this.videoPath,
+				this.videoPath,
+				"",
+				"瑙嗛",
+				"bits",
+				"瑙嗛锛�" + this.videoName
+			);
+			this.localIsCollectVideo = !this.localIsCollectVideo;
+		},
+		//璧勬簮鏀惰棌浜嬩欢
+		// resourcePath 鏂囦欢璺緞锛�
+		// resourceType 鏂囦欢绫诲瀷
+		// source 鏂囦欢鏉ユ簮
+		handleCollectResource(
+			id,
+			md5,
+			resourcePath,
+			resourceType,
+			source,
+			resourceName
+		) {
 
-        handleCollect() {
-            this.handleCollectResource(
-                this.videoPath,
-                this.videoPath,
-                "",
-                "瑙嗛",
-                "bits",
-                "瑙嗛锛�" + this.videoName
-            );
-            this.localIsCollectVideo = !this.localIsCollectVideo;
-        },
-        //璧勬簮鏀惰棌浜嬩欢
-        // resourcePath  鏂囦欢璺緞锛�
-        // resourceType  鏂囦欢绫诲瀷
-        // source        鏂囦欢鏉ユ簮
-        handleCollectResource(
-            id,
-            md5,
-            resourcePath,
-            resourceType,
-            source,
-            resourceName
-        ) {
-            let list = this.collectResourceList;
-            if (list.findIndex((item) => item.id == id) > -1) {
-                list = list.filter((item) => item.id != id);
-            } else {
-                list.push({
-                    id,
-                    md5,
-                    resourcePath,
-                    resourceType,
-                    source,
-                    resourceName,
-                });
-            }
-            this.collectResourceList = list;
-            setCollectResource(
-                this.BookId,
-                this.collectResourceList
-            );
-        },
-    },
+			let list = this.collectResourceList;
+			if (list.findIndex((item) => item.id == id) > -1) {
+				list = list.filter((item) => item.id != id);
+			} else {
+				list.push({
+					id,
+					md5,
+					resourcePath,
+					resourceType,
+					source,
+					resourceName,
+				});
+			}
+			this.collectResourceList = list;
+			setCollectResource(
+				this.BookId,
+				this.collectResourceList
+			);
+		},
+	},
 };
 </script>
 
 <style lang="less" scoped>
 .knowledgeExpansionVideo {
-    margin: 30px 0;
-    padding: 10px 0;
-    /* 浣跨敤鏂扮殑 --logo-color-rgb 鍙橀噺 */
-    border-top: 10px solid rgba(var(--logo-color-rgb), 0.6);
-    border-bottom: 10px solid rgba(var(--logo-color-rgb), 0.6);
-    position: relative;
+	margin: 30px 0;
+	padding: 10px 0;
+	/* 浣跨敤鏂扮殑 --logo-color-rgb 鍙橀噺 */
+	border-top: 10px solid rgba(var(--logo-color-rgb), 0.6);
+	border-bottom: 10px solid rgba(var(--logo-color-rgb), 0.6);
+	position: relative;
 }
 
 
 
 .questionBank-video {
-    position: relative;
-    line-height: 0px;
-    display: flex;
-    align-items: center;
-    top: -29px;
-    left: 30px;
+	position: relative;
+	line-height: 0px;
+	display: flex;
+	align-items: center;
+	top: -29px;
+	left: 30px;
 
-    svgIcon {
-        width: 13px;
-    }
+	svgIcon {
+		width: 13px;
+	}
 
-    span {
-        font-size: 14px;
-        font-weight: 600;
-        margin-left: 1px;
-    }
+	span {
+		font-size: 14px;
+		font-weight: 600;
+		margin-left: 1px;
+	}
 
 }
 
 .knowledgeExpansion-video {
-    padding: 0 8%;
+	padding: 0 8%;
 }
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.9.1