This commit is contained in:
zhouhefeng
2026-06-01 08:36:26 +08:00
parent f05e534e52
commit 8b47088953
47 changed files with 1733 additions and 301 deletions
@@ -411,7 +411,8 @@ layout("/layouts/platform_h5.html"){
currentSegmentId: "",
studying: false,
pendingSeconds: 0,
heartbeatTimer: null
heartbeatTimer: null,
navigatingBack: false
}
},
computed: {
@@ -685,9 +686,29 @@ layout("/layouts/platform_h5.html"){
this.finishStudy(false)
this.playerVisible = false
},
goBack() {
this.finishStudy(true)
pjaxReplace("/platform/learning/course/h5")
async goBack() {
if (this.navigatingBack) return
this.navigatingBack = true
try {
await this.finishStudy(true)
} finally {
this.navigateBack()
}
},
navigateBack() {
if (window.history.length > 1) {
window.history.back()
return
}
$.pjax({
url: "/platform/learning/course/h5",
container: "#container",
maxCacheLength: 0,
push: false,
replace: true,
fragment: "#container",
timeout: 8000
})
}
},
async mounted() {