Commit dfc7cf06 by 陈超

A

parent 1913b0e9
...@@ -632,7 +632,8 @@ ...@@ -632,7 +632,8 @@
if(my.length > 0) { if(my.length > 0) {
this.finished.push({ this.finished.push({
qId: q.exams_question_id, qId: q.exams_question_id,
option: my[0].key option: my[0].key,
key: "radio"
}) })
} }
break break
...@@ -642,22 +643,44 @@ ...@@ -642,22 +643,44 @@
//Request //Request
saveProgress: function() { saveProgress: function() {
let that = this let that = this
let time = this.info.reply_time * 60 - this.timeConsumed let time = that.info.reply_time * 60 - that.timeConsumed
let param = { let param = {
anser_time: this.timeConsumed, anser_time: that.timeConsumed,
exams_mode: 1, exams_mode: 1,
paper_id: this.info.paper_id, paper_id: that.info.paper_id,
ch_id: "{$_GET['s_id']}", ch_id: "{$_GET['s_id']}",
view_url: "{$_GET['view']}", view_url: "{$_GET['view']}",
is_timeout: time <= 0 ? 1 : 0, is_timeout: time <= 0 ? 1 : 0,
paper_options_id: this.info.paper_options_id, paper_options_id: that.paperOptions.exams_paper_options_id,
} }
// user_answer[15]: 'A', that.finished.forEach( r => {
// user_answer[14]: 'B', let key = 'user_answer[' + r.qId + ']'
// user_answer[13]: 'B', switch(r.key) {
// user_answer[12]: 'C', case "radio":
// user_answer[11]: 'C', param.key = r.option
break
}
})
console.log(param) console.log(param)
return
$.post(
U('exams/Index/doProgressExams'),
param,
function(res) {
if (typeof(res) != 'object') {
try {
let res = JSON.parse(res)
} catch (e) {
ui.error("处理异常,请重新尝试")
}
}
if (res.status == 1) {
ui.success(res.data.info)
window.location.href = res.data.jumpurl
} else {
ui.error(res.message)
}
})
}, },
submitPaper: function() { submitPaper: function() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment