闫增涛
2024-06-07 7944d624d5adf492a4a5ead068b2a88c707e2388
src/books/childHealth/view/content/components/chapter005.vue
@@ -2723,7 +2723,7 @@
<script>
import examinations from "@/components/examinations/index.vue";
import getResourcePath from "@/assets/methods/resources";
import {getResourcePath} from "@/assets/methods/resources";
export default {
  name: "chapterFive",
  components: { examinations },
@@ -2733,6 +2733,10 @@
    },
    showPageList: {
      type: Array,
    },
    isSearch: {
      type: Boolean,
      default: false,
    },
  },
  data() {
@@ -2837,22 +2841,7 @@
    if (localData) {
      this.chapterFiveData = JSON.parse(localData);
    }
    window.timerFive = setInterval(() => {
      this.saveTime--;
      if (this.saveTime == 0) {
        this.saveChapterOneData();
      }
    }, 1000);
    this.getVideoPath();
  },
  unmounted() {
    if (window.timerFive) {
      clearInterval(window.timerFive);
    }
    localStorage.setItem(
      "chapterFiveData",
      JSON.stringify(this.chapterFiveData)
    );
  },
  methods: {
    changeResources(type) {
@@ -2869,19 +2858,18 @@
      }
    },
    saveChapterOneData() {
      this.saveTime = 20;
      localStorage.setItem(
        "chapterFiveData",
        JSON.stringify(this.chapterFiveData)
      );
    },
    getVideoPath() {
      this.$data.pathOne = getResourcePath("5698398be3f5c7fdb247218b2a687257");
      this.$data.pathTwo = getResourcePath("5905673b09837c74953dd11fcb27d123");
      this.$data.pathThree = getResourcePath(
    async getVideoPath() {
      this.$data.pathOne = await getResourcePath("5698398be3f5c7fdb247218b2a687257");
      this.$data.pathTwo = await getResourcePath("5905673b09837c74953dd11fcb27d123");
      this.$data.pathThree = await getResourcePath(
        "1f768157227c193ed5c11f972f66e692"
      );
      this.$data.pathFour = getResourcePath("4f446d88ec1ed081a172b7130dce896b");
      this.$data.pathFour = await getResourcePath("4f446d88ec1ed081a172b7130dce896b");
    },
  },
};