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