| | |
| | | |
| | | <script> |
| | | import examinations from "@/components/examinations/index.vue"; |
| | | import getResourcePath from "@/assets/methods/resources"; |
| | | import {getResourcePath} from "@/assets/methods/resources"; |
| | | export default { |
| | | name: "chapterTen", |
| | | components: { examinations }, |
| | |
| | | }, |
| | | showPageList: { |
| | | type: Array, |
| | | }, |
| | | isSearch: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | }, |
| | | data() { |
| | |
| | | }; |
| | | }, |
| | | async mounted() { |
| | | const localData = localStorage.getItem("chapterTenData"); |
| | | if (localData) { |
| | | this.chapterTenData = JSON.parse(localData); |
| | | } |
| | | window.timerTen = setInterval(() => { |
| | | this.saveTime--; |
| | | if (this.saveTime == 0) { |
| | | this.saveChapterOneData(); |
| | | if(!this.isSearch) { |
| | | const localData = localStorage.getItem("chapterTenData"); |
| | | if (localData) { |
| | | this.chapterTenData = JSON.parse(localData); |
| | | } |
| | | }, 1000); |
| | | this.getVideoPath(); |
| | | window.timerTen = setInterval(() => { |
| | | this.saveTime--; |
| | | if (this.saveTime == 0) { |
| | | this.saveChapterOneData(); |
| | | } |
| | | }, 1000); |
| | | this.getVideoPath(); |
| | | } |
| | | }, |
| | | unmounted() { |
| | | if (window.timerTen) { |
| | |
| | | JSON.stringify(this.chapterTenData) |
| | | ); |
| | | }, |
| | | getVideoPath() { |
| | | this.$data.pathOne = getResourcePath("3f507f73eb9d8c2af4dfcfb032ae696e"); |
| | | this.$data.pathTwo = getResourcePath("93d4edcc8ef4f947ebfb0cee38ccaa71"); |
| | | async getVideoPath() { |
| | | this.$data.pathOne = await getResourcePath("3f507f73eb9d8c2af4dfcfb032ae696e"); |
| | | this.$data.pathTwo = await getResourcePath("93d4edcc8ef4f947ebfb0cee38ccaa71"); |
| | | }, |
| | | }, |
| | | }; |