提交
This commit is contained in:
@@ -346,7 +346,7 @@
|
||||
|
||||
},
|
||||
timeCount() {
|
||||
const time = this.subject == '1' ? 60 * 60 * 1000 : 45 * 60 * 1000
|
||||
const time = 45 * 60 * 1000
|
||||
return time
|
||||
}
|
||||
},
|
||||
@@ -504,21 +504,27 @@
|
||||
toSubmit() {
|
||||
const restTime = this.time.hours * 60 * 60 + this.time.minutes * 60 + this.time.seconds
|
||||
const score = (this.rightList.length / this.questionList.length * 100).toFixed(0)
|
||||
submitTest({
|
||||
"carTypeId": storage.get('carType') || '1001',
|
||||
"score": score,
|
||||
"testTime": 60 * 60 - restTime,
|
||||
subject: this.subject
|
||||
}).then(resp => {
|
||||
const doNotNum = this.questionList.length - this.rightList.length - this.wrongList.length
|
||||
const list = JSON.stringify(this.wrongList)
|
||||
if (resp.code === '0000') {
|
||||
uni.navigateTo({
|
||||
url: "/pages/questionBank/examResult?doNotNum=" + doNotNum + "&wrongList=" + list + "&score=" +
|
||||
score + "&subject=" + this.subject + "&navTitle=" + this.navTitle
|
||||
})
|
||||
}
|
||||
})
|
||||
if(this.rightList.length+this.wrongList.length==0){
|
||||
uni.navigateBack({
|
||||
delta:1
|
||||
})
|
||||
}else{
|
||||
submitTest({
|
||||
"carTypeId": storage.get('carType') || '1001',
|
||||
"score": score,
|
||||
"testTime": 45 * 60 - restTime,
|
||||
subject: this.subject
|
||||
}).then(resp => {
|
||||
const doNotNum = this.questionList.length - this.rightList.length - this.wrongList.length
|
||||
const list = JSON.stringify(this.wrongList)
|
||||
if (resp.code === '0000') {
|
||||
uni.navigateTo({
|
||||
url: "/pages/questionBank/examResult?doNotNum=" + doNotNum + "&wrongList=" + list + "&score=" +
|
||||
score + "&subject=" + this.subject + "&navTitle=" + this.navTitle
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
//查看考试结果
|
||||
toResult() {
|
||||
|
||||
Reference in New Issue
Block a user