commit
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user