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

fix: 取消自动刷新直播接口

上级 59f43674
......@@ -107,13 +107,10 @@ export default {
clearInterval(this.timeInterval)
this.timeInterval = null
}
this.timeInterval = setInterval(() => {
cAction.Player.getNewLiveMsg().then(json => {
if (json.status === 200) {
this.newLiveMsg = json.data
}
}).catch(e => { this.$message.error(e.message) }).finally(() => { })
}, 3000)
// 获取最新直播
this.getLatestLive()
// 定时获取最新直播
this.timeInterval = setInterval(this.getLatestLive, 10000)
const loading = this.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' })
cAction.Course.getLearnFind().then(data => {
......@@ -194,6 +191,14 @@ export default {
/* 直接进直播 */
goLive () {
this.$router.push({ name: 'viewerCourseChapter', params: { sid: this.newLiveMsg.semester_id, cid: this.newLiveMsg.course_id, id: this.newLiveMsg.chapter_id } })
},
// 获取最新直播
getLatestLive() {
cAction.Player.getNewLiveMsg().then(json => {
if (json.status === 200) {
this.newLiveMsg = json.data
}
}).catch(e => { this.$message.error(e.message) })
}
}
}
......
......@@ -393,9 +393,7 @@ export default {
window.addEventListener('resize', this.resizeRoot.bind(this), false)
/* 实时刷新数据 */
if (this.timeHeart) { clearInterval(this.timeHeart); this.timeHeart = null }
this.timeHeart = setInterval(() => {
this.updatePages()
}, 3000)
// this.timeHeart = setInterval(this.updatePages(), 3000)
this.arrFn = this.initBindKeyfn()
},
destroyed () {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论