zhongshujie
3 天以前 20f565e134743664045fc42376ef5acd826acbe3
src/components/bookVideo/index.vue
@@ -1,10 +1,9 @@
<template>
    <div class="knowledgeExpansion" style="">
   <div class="knowledgeExpansion theme-color">
        <div class="questionBank-video">
            <svgIcon icon-file-name="sanJiao" :color="logoColor"></svgIcon>
            <span :style="{ color: logoColor }">视频</span>
         <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"
@@ -20,7 +19,7 @@
                    ) > -1
                        ? collectCheck
                        : collectImg
                        " :color="logoColor" @click="handleCollect()"></svgIcon>
                        " @click="handleCollect()"></svgIcon>
                </el-tooltip>
            </p>
        </div>
@@ -43,16 +42,12 @@
            collectResourceList: [],
            localIsCollectVideo: false,
            isDisplay: true,
         videoName: this.videoInfo.resourceName
        };
    },
    props: {
        videoPath: {
            type: String,
            required: "",
        },
        videoName: {
            type: String,
            required: "",// 默认值
      videoInfo: {
         type: Object,
        },
        BookId: {
            type: String,
@@ -64,6 +59,8 @@
        },
    },
    async mounted() {
      debugger
      console.log(this.videoInfo, "111111");
        await this.getVidoePath();
        this.collectResourceList = await getCollectResource(
            this.BookId
@@ -73,12 +70,14 @@
    },
    methods: {
        async getVidoePath() {
         console.log(this.videoInfo, "this.videoInfo.md5");
            this.videoPathSrc = await getResourcePath(
                this.videoPath
            this.videoInfo.md5
            );
        },
        handleCollect() {
         debugger
            this.handleCollectResource(
                this.videoPath,
                this.videoPath,
@@ -101,6 +100,7 @@
            source,
            resourceName
        ) {
            let list = this.collectResourceList;
            if (list.findIndex((item) => item.id == id) > -1) {
                list = list.filter((item) => item.id != id);