|
|
|
@ -72,6 +72,18 @@ |
|
|
|
|
<div class="video_wid" |
|
|
|
|
id="player"></div> |
|
|
|
|
</div> |
|
|
|
|
<div class="inner" |
|
|
|
|
v-else-if="videoSrc"> |
|
|
|
|
<video class="video" |
|
|
|
|
width="100%" |
|
|
|
|
height="100%" |
|
|
|
|
autoplay |
|
|
|
|
controls> |
|
|
|
|
<source :src="videoSrc" |
|
|
|
|
type="video/mp4"> |
|
|
|
|
您的浏览器不支持 video 标签。 |
|
|
|
|
</video> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="catalog"> |
|
|
|
|
<div class="m-b-20"> |
|
|
|
@ -472,6 +484,7 @@ export default { |
|
|
|
|
currentPage: 0, // pdf文件页码 |
|
|
|
|
pageCount: 0, // pdf文件总页数 |
|
|
|
|
fileType: "pdf", // 文件类型 |
|
|
|
|
videoSrc: '', |
|
|
|
|
desShrink: false, |
|
|
|
|
projectVisible: false, |
|
|
|
|
projects: [], |
|
|
|
@ -801,38 +814,42 @@ export default { |
|
|
|
|
// 如果没过期,则正常预览,否则显示购买弹框 |
|
|
|
|
if (this.overdue || showDia) { |
|
|
|
|
this.curLink = `${chapterName}${row.name}`; // 章节名称+小节名称,小节名称有重复的情况,如果只用小节名称判断,会有同时选中多个的情况 |
|
|
|
|
this.playauth = '' |
|
|
|
|
this.playAuth = '' |
|
|
|
|
this.coverUrl = '' |
|
|
|
|
this.pdfSrc = '' |
|
|
|
|
this.iframeSrc = '' |
|
|
|
|
this.videoSrc = '' |
|
|
|
|
this.isPPT = false; |
|
|
|
|
this.isWord = false; |
|
|
|
|
this.isExcel = false; |
|
|
|
|
if (this.transferType(row.fileType) == "视频") { |
|
|
|
|
this.$get(`${this.api.getPlayAuth}/${row.fileId}`).then(res => { |
|
|
|
|
this.playAuth = res.data.playAuth; |
|
|
|
|
// 如果已经产生了实例,则销毁重新创建,不然播放器会播放上一个视频 |
|
|
|
|
if (this.player) { |
|
|
|
|
this.player.dispose() |
|
|
|
|
this.player = null |
|
|
|
|
} |
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
// 阿里云视频点播 |
|
|
|
|
if (row.fileId) { |
|
|
|
|
this.$get(`${this.api.getPlayAuth}/${row.fileId}`).then(res => { |
|
|
|
|
this.playAuth = res.data.playAuth; |
|
|
|
|
// 如果已经产生了实例,则销毁重新创建,不然播放器会播放上一个视频 |
|
|
|
|
if (this.player) { |
|
|
|
|
this.player.replayByVidAndPlayAuth(row.fileId, this.playAuth); |
|
|
|
|
} else { |
|
|
|
|
this.player = new Aliplayer({ |
|
|
|
|
id: "player", |
|
|
|
|
width: "100%", |
|
|
|
|
autoplay: false, |
|
|
|
|
vid: row.fileId, |
|
|
|
|
playauth: this.playAuth, |
|
|
|
|
encryptType: 1 //当播放私有加密流时需要设置。 |
|
|
|
|
}); |
|
|
|
|
this.player.dispose() |
|
|
|
|
this.player = null |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}).catch(res => { |
|
|
|
|
}); |
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
if (this.player) { |
|
|
|
|
this.player.replayByVidAndPlayAuth(row.fileId, this.playAuth); |
|
|
|
|
} else { |
|
|
|
|
this.player = new Aliplayer({ |
|
|
|
|
id: "player", |
|
|
|
|
width: "100%", |
|
|
|
|
autoplay: false, |
|
|
|
|
vid: row.fileId, |
|
|
|
|
playauth: this.playAuth, |
|
|
|
|
encryptType: 1 //当播放私有加密流时需要设置。 |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}).catch(res => { }); |
|
|
|
|
} else { |
|
|
|
|
this.videoSrc = row.fileUrl |
|
|
|
|
} |
|
|
|
|
} else if (this.transferType(row.fileType) == "图片") { |
|
|
|
|
this.coverUrl = row.fileUrl; |
|
|
|
|
} else if (row.fileType == "pdf") { |
|
|
|
@ -949,7 +966,9 @@ export default { |
|
|
|
|
util.cookies.set('systemId', id) |
|
|
|
|
util.cookies.set('fromManager', 1) |
|
|
|
|
util.cookies.set('isSubmit', '', -1) |
|
|
|
|
util.cookies.set('competitionId', '', -1) |
|
|
|
|
util.cookies.set('language', '', -1) |
|
|
|
|
util.cookies.set('className', '', -1) |
|
|
|
|
// 8个python子系统都跳这个地址,子系统会通过cookie里的systemId识别展示哪套系统 |
|
|
|
|
location.href = process.env.NODE_ENV === 'development' ? |
|
|
|
|
`http://${location.hostname}:8085/#/` : |
|
|
|
|