提交 ce5a53b7 authored 作者: 王鹏飞's avatar 王鹏飞

分享海报以弹框的形式展示

上级 c05851b2
...@@ -34,6 +34,9 @@ ...@@ -34,6 +34,9 @@
</em> </em>
<em :class="skipClass" @click="toggleSkip">{{ $t('viewerPlayer.skipTitle') }}</em> <em :class="skipClass" @click="toggleSkip">{{ $t('viewerPlayer.skipTitle') }}</em>
</div> </div>
<el-dialog :visible.sync="dialogVisible" width="700px" top="60px">
<iframe :src="sharePageUrl" style="width:100%;height:800px;border:0;"></iframe>
</el-dialog>
</div> </div>
</template> </template>
...@@ -76,7 +79,8 @@ export default { ...@@ -76,7 +79,8 @@ export default {
}, },
player: null, player: null,
watchedTime: 0, watchedTime: 0,
watchedTimePoint: [] // 视频观看的时间点 watchedTimePoint: [], // 视频观看的时间点
dialogVisible: false // 分享海报弹出
} }
}, },
watch: { watch: {
...@@ -118,6 +122,9 @@ export default { ...@@ -118,6 +122,9 @@ export default {
'player-button-skip': !this.isSkip, 'player-button-skip': !this.isSkip,
'player-button-skip__active': this.isSkip 'player-button-skip__active': this.isSkip
} }
},
sharePageUrl() {
return `https://webapp-pub.ezijing.com/website/prod/share/index.html#/share?semesterId=${this.sid}&courseId=${this.cid}&chapterId=${this.chapter.id}`
} }
}, },
methods: { methods: {
...@@ -160,11 +167,8 @@ export default { ...@@ -160,11 +167,8 @@ export default {
chapter_id: this.chapter.id chapter_id: this.chapter.id
} }
api.getShare(params).then(res => { api.getShare(params).then(res => {
if (res.code === 0) { if (res.code === 0 && res.data.need_share) {
if (res.data.need_share) { this.dialogVisible = true
const url = `https://webapp-pub.ezijing.com/website/prod/share/index.html#/share?semesterId=${params.semester_id}&courseId=${params.course_id}&chapterId=${params.chapter_id}`
window.open(url)
}
} }
}) })
}, },
...@@ -348,4 +352,17 @@ export default { ...@@ -348,4 +352,17 @@ export default {
background-position: 0 -200px; background-position: 0 -200px;
color: #b19241; color: #b19241;
} }
::v-deep .el-dialog {
background-color: #3f3f3f;
border-radius: 10px;
}
::v-deep .el-dialog__header {
min-height: 30px;
}
::v-deep .el-dialog__headerbtn .el-dialog__close {
font-size: 30px;
}
::v-deep .el-dialog__body {
padding: 0;
}
</style> </style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论