斜塘答题

master
lion 2 years ago
parent fc77d5d378
commit d2eed6c808

@ -148,8 +148,9 @@
this.minutes = minutes.toString().padStart(2, '0') this.minutes = minutes.toString().padStart(2, '0')
this.seconds = seconds.toString().padStart(2, '0') this.seconds = seconds.toString().padStart(2, '0')
}, () => { }, () => {
clearTimeout(this.timer)
this.submitQue() this.submitQue()
}); });
}, },
onUnload() { onUnload() {
@ -235,7 +236,6 @@
console.log("hasFlag",this.hasFlag) console.log("hasFlag",this.hasFlag)
}, },
submitQue(){ submitQue(){
console.log("this.myAnswer",this.myAnswer)
let that = this let that = this
const query = uni.createSelectorQuery().in(this); const query = uni.createSelectorQuery().in(this);
query.select('.wrap').boundingClientRect(({ height }) => { query.select('.wrap').boundingClientRect(({ height }) => {
@ -275,10 +275,8 @@
} }
}) })
console.log("this.correctScore",this.correctScore,this.correctNum)
}, },
nextQue(){ nextQue(){
console.log("进入questionIndex",this.questionIndex,this.correctNum)
let that = this let that = this
// this.isanswer = false // this.isanswer = false
if(this.isanswer){ if(this.isanswer){
@ -313,12 +311,8 @@
}) })
this.correctAnswer = this.question_list[this.questionIndex]['correctAnswer'].join(',') this.correctAnswer = this.question_list[this.questionIndex]['correctAnswer'].join(',')
console.log("this.questionIndex",this.questionIndex,this.correctNum)
// if(this.questionIndex==9){ //
// that.answerSubmit = true
// return
// }
//
this.question_list[this.questionIndex]['options'].map(item=>{ this.question_list[this.questionIndex]['options'].map(item=>{
if(item.is_correct===1){ if(item.is_correct===1){
item.isanswer = true item.isanswer = true
@ -327,7 +321,7 @@
} }
}) })
this.isanswer = true this.isanswer = true
if(that.questionIndex==9){ if(that.answerSubmit){
that.submitQue() that.submitQue()
return return
} }

Loading…
Cancel
Save