| | |
| | | <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" |
| | |
| | | ) > -1 |
| | | ? collectCheck |
| | | : collectImg |
| | | " :color="logoColor" @click="handleCollect()"></svgIcon> |
| | | " @click="handleCollect()"></svgIcon> |
| | | </el-tooltip> |
| | | </p> |
| | | </div> |
| | |
| | | collectResourceList: [], |
| | | localIsCollectVideo: false, |
| | | isDisplay: true, |
| | | videoName: this.videoInfo.resourceName |
| | | }; |
| | | }, |
| | | props: { |
| | | videoPath: { |
| | | type: String, |
| | | required: "", |
| | | }, |
| | | videoName: { |
| | | type: String, |
| | | required: "",// 默认值 |
| | | videoInfo: { |
| | | type: Object, |
| | | }, |
| | | BookId: { |
| | | type: String, |
| | |
| | | }, |
| | | }, |
| | | async mounted() { |
| | | debugger |
| | | console.log(this.videoInfo, "111111"); |
| | | await this.getVidoePath(); |
| | | this.collectResourceList = await getCollectResource( |
| | | this.BookId |
| | |
| | | }, |
| | | 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, |
| | |
| | | source, |
| | | resourceName |
| | | ) { |
| | | |
| | | let list = this.collectResourceList; |
| | | if (list.findIndex((item) => item.id == id) > -1) { |
| | | list = list.filter((item) => item.id != id); |