提交 bcfd1e2d 编写于 作者: xiaoping.di's avatar xiaoping.di

kaos

上级 7d3c9951
...@@ -391,14 +391,12 @@ ...@@ -391,14 +391,12 @@
return surplusTime > 0 ? Math.floor((this.examTime - surplusTime) / 1000) : this.examTime / 1000; return surplusTime > 0 ? Math.floor((this.examTime - surplusTime) / 1000) : this.examTime / 1000;
}, },
submit() { submit() {
alert(123);
const para = { const para = {
answerTime: this.getAnswerTime(), answerTime: this.getAnswerTime(),
examId: this.$route.query.examId, examId: this.$route.query.examId,
type: 5, type: 5,
token:this.token token:this.token
}; };
console.log(this.token, '--------');
let resultList = []; let resultList = [];
Object.keys(this.selected).forEach( attr => { Object.keys(this.selected).forEach( attr => {
resultList.push(this.selected[attr]); resultList.push(this.selected[attr]);
...@@ -409,34 +407,23 @@ ...@@ -409,34 +407,23 @@
para.resultList = resultList; para.resultList = resultList;
this.showLoading = true; this.showLoading = true;
this.isSubmitting = true; this.isSubmitting = true;
console.log(para, 'para');
getAnwserExam(para).catch(res => { getAnwserExam(para).catch(res => {
this.showLoading = false; this.showLoading = false;
this.isSubmitting = false; this.isSubmitting = false;
const data = res.data; const data = res.data;
if(data.respCode == 200) { if(data.respCode == 200) {
alert(2222);
const query = { const query = {
examId: this.$route.query.examId, examId: this.$route.query.examId,
answerResultId: data.answerResultId, answerResultId: data.answerResultId,
from: 'exam' from: 'exam'
}; };
alert(33);
if (this.startNum > 0) { if (this.startNum > 0) {
alert(4);
query.endNum = this.startNum - 1; query.endNum = this.startNum - 1;
// this.$set(this.query, 'endNum', this.startNum - 1); // this.$set(this.query, 'endNum', this.startNum - 1);
// Vue.set(query, 'endNum', this.startNum - 1); // Vue.set(query, 'endNum', this.startNum - 1);
} }
alert(5);
this.$router.push({name:'examResult', query: query}); this.$router.push({name:'examResult', query: query});
// alert(1111);
return; return;
// this.$router.push({
// path:'/exam-result',
// query: query
// });
alert(1111);
} else { } else {
this.$toast(data.respMsg); this.$toast(data.respMsg);
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册