Procházet zdrojové kódy

代码小改动 移位置

谢杰标 před 2 roky
rodič
revize
8a85a2e813
1 změnil soubory, kde provedl 5 přidání a 6 odebrání
  1. 5 6
      pages3/polyv/detail.vue

+ 5 - 6
pages3/polyv/detail.vue

@@ -491,14 +491,13 @@ export default {
   },
   onUnload() {
     console.log("onUnload");
-    if (this.sectionId > 0 && this.isPlaying) {
-      //退出提交记录
+    if (this.isPlaying) {
       this.postStudyRecord();
     }
     this.refPlv = null;
-    //移除所有的事件监听器
     uni.$off();
     this.clearPauseTimer();
+    uni.removeInterceptor("navigateTo");
     if (this.lockTimer) {
       clearInterval(this.lockTimer);
       this.$api.lockDelLock({
@@ -506,7 +505,6 @@ export default {
         uuid: this.$method.getUuid(),
       });
     }
-    uni.removeInterceptor("navigateTo");
   },
   onHide() {
     this.beforeHideIsPlaying = this.isPlaying;
@@ -524,6 +522,9 @@ export default {
       // #ifdef H5
       this.isAllowSeek = "on";
       // #endif
+      this.photoList = [];
+      this.courseList = [];
+      this.photoConfig = false;
       await this.isCanLearn();
       this.courseCourseList();
     },
@@ -570,8 +571,6 @@ export default {
       this.newActiveSubjectId = item.subjectId;
     },
     courseCourseList() {
-      this.photoConfig = false;
-      this.courseList = [];
       this.$api
         .courseCourseList({
           pageNum: 1,