-
- {{ opt.sort }}: {{ opt.content}}
+
-
@@ -64,13 +67,13 @@ export default {
},
list: [],
activeIndex: 0, // 当前第几题
- createdTime: '', // 开始答题时间
endTime: '', // 结束时间
id: '', // 题库id
showConfirm: false,
showNext: false,
clickIndex: '',
showAnalysis: false,
+ subjectConfigs: [],
}
},
methods: {
@@ -78,21 +81,36 @@ export default {
this.$instance.post(`/app/appexaminationinfo/queryDetailById?id=${id}`).then(res=> {
if(res?.data) {
this.list = res.data.questions
+ this.subjectConfigs = res.data.subjectConfigs
}
})
},
itemClick(i) {
- if(this.list[this.activeIndex].type==2) { // 判断
+ if (this.showAnalysis) return
+
+ if(this.list[this.activeIndex].type==0) { // 单选
+
+ } else if(this.list[this.activeIndex].type==1) { // 多选
+
+ } else if(this.list[this.activeIndex].type==2) { // 判断
this.clickIndex = i
this.showConfirm = true
- // this.list[this.activeIndex].items.myAnswer = this.list[this.activeIndex].i
}
},
nextTopic() {
this.activeIndex ++;
+ this.clickIndex = ''
+ this.showAnalysis = false
},
confirm() {
- uni.navigateTo({url: './result'})
+
+ this.showAnalysis = true;
+ if(this.activeIndex < this.list.length - 1) {
+ this.showNext = true;
+ this.showConfirm = false;
+ } else {
+ uni.navigateTo({url: './result'})
+ }
},
},
onReachBottom() {
@@ -100,7 +118,6 @@ export default {
},
onLoad(o) {
this.getList(o.id)
- // this.createdTime = Date.parse(new Date())
}
}