闫增涛
2024-06-06 57ebfaedfe6364ab0c3beb1afe01c00fe2798a2c
src/books/childHealth/view/content/components/chapter006.vue
@@ -2731,6 +2731,10 @@
    showPageList: {
      type: Array,
    },
    isSearch: {
      type: Boolean,
      default: false,
    },
  },
  data() {
    return {
@@ -2850,17 +2854,19 @@
    };
  },
  async mounted() {
    const localData = localStorage.getItem("chapterSixData");
    if (localData) {
      this.chapterSixData = JSON.parse(localData);
    }
    window.timerSix = setInterval(() => {
      this.saveTime--;
      if (this.saveTime == 0) {
        this.saveChapterOneData();
    if(!this.isSearch) {
      const localData = localStorage.getItem("chapterSixData");
      if (localData) {
        this.chapterSixData = JSON.parse(localData);
      }
    }, 1000);
    this.getVideoPath();
      window.timerSix = setInterval(() => {
        this.saveTime--;
        if (this.saveTime == 0) {
          this.saveChapterOneData();
        }
      }, 1000);
      this.getVideoPath();
    }
  },
  unmounted() {
    if (window.timerSix) {