| | |
| | | <textarea |
| | | cols="30" |
| | | rows="4" |
| | | v-model="chapterTwoData.learnTableTwo.qEvelen" |
| | | v-model="chapterTwoData.learnTableTwo.qEleven" |
| | | placeholder="请输入内容" |
| | | maxlength="300" |
| | | class="w100 ta-br textarea-text" |
| | |
| | | qEight: "", |
| | | qNine: "", |
| | | qTen: "", |
| | | qEvelen: "", |
| | | qEleven: "", |
| | | }, |
| | | learnTableThree: { |
| | | qOne: "", |
| | |
| | | }; |
| | | }, |
| | | async mounted() { |
| | | const localData = localStorage.getItem('chapterTwoData') |
| | | if(localData) { |
| | | this.chapterTwoData = JSON.parse(localData) |
| | | } |
| | | window.timerOne = setInterval(() => { |
| | | this.saveTime-- |
| | | if(this.saveTime == 0) { |
| | | this.saveChapterOneData() |
| | | } |
| | | },1000) |
| | | this.$data.questionData = await getQuestionData('2',testData[2]); |
| | | this.$data.pathOne = getResourcePath("e2b2b610e8b77c82bad7cf94c7986646"); |
| | | this.$data.pathTwo = getResourcePath("b11b51863da2a4e7e21c73358fa96c1e"); |
| | | this.$data.pathThree = getResourcePath("67cf97bd8295dc3aeb46982c574df8d0"); |
| | | }, |
| | | unmounted() { |
| | | if(window.timerTwo) { |
| | | clearInterval(window.timerTwo) |
| | | } |
| | | localStorage.setItem('chapterTwoData',JSON.stringify(this.chapterTwoData)) |
| | | }, |
| | | methods: { |
| | | changeResources(type) { |
| | |
| | | this.$data.videoState = !this.$data.videoState; |
| | | } |
| | | }, |
| | | saveChapterOneData() { |
| | | this.saveTime = 20 |
| | | console.log(this.chapterTwoData); |
| | | localStorage.setItem('chapterTwoData',JSON.stringify(this.chapterTwoData)) |
| | | } |
| | | }, |
| | | }; |
| | | </script> |