...
|
...
|
@@ -18,7 +18,7 @@ Page({ |
|
|
// const choose = +e.currentTarget.dataset.choose;
|
|
|
que_list[current_que].choose = true;
|
|
|
this.setData({current_que: current_que, que_list: que_list});
|
|
|
console.log('父级点击事件que_list', que_list, current_que);
|
|
|
// console.log('父级点击事件que_list', que_list, current_que);
|
|
|
// return false
|
|
|
// this.radioChange(e)
|
|
|
},
|
...
|
...
|
@@ -27,7 +27,7 @@ Page({ |
|
|
const current = +e.currentTarget.dataset.sindex;
|
|
|
const pindex = +e.currentTarget.dataset.pindex;
|
|
|
const score = +e.currentTarget.dataset.score;
|
|
|
console.log('label事件分数', score);
|
|
|
// console.log('label事件分数', score);
|
|
|
this.setData({current_ans: current,});
|
|
|
|
|
|
// [`questionList[${this.data.current_que}].content[${current}].checked`]:!this.data.choose
|
...
|
...
|
@@ -63,7 +63,7 @@ Page({ |
|
|
// })
|
|
|
// }
|
|
|
this.setData({current_answer: +e.detail.value, [`questionList[${pindex}].content`]: answer});
|
|
|
console.log('questionList', this.data.questionList);
|
|
|
// console.log('questionList', this.data.questionList);
|
|
|
},
|
|
|
//题目列表
|
|
|
answerList() {
|
...
|
...
|
@@ -76,7 +76,7 @@ Page({ |
|
|
"token": wx.getStorageSync('token')
|
|
|
};
|
|
|
app.post(url, params, {}).then((res) => {
|
|
|
console.log('题目', res);
|
|
|
// console.log('题目', res);
|
|
|
if (+res.code === 1) {
|
|
|
res.data.list.forEach(((item) => {
|
|
|
item.choose = false;
|
...
|
...
|
@@ -87,7 +87,7 @@ Page({ |
|
|
self.setData({
|
|
|
questionList: res.data.list,
|
|
|
});
|
|
|
console.log(self.data.questionList);
|
|
|
// console.log(self.data.questionList);
|
|
|
}
|
|
|
})
|
|
|
},
|
...
|
...
|
@@ -110,7 +110,7 @@ Page({ |
|
|
}
|
|
|
})
|
|
|
});
|
|
|
console.log('total_score', total_score);
|
|
|
// console.log('total_score', total_score);
|
|
|
this.setData({score: total_score});
|
|
|
wx.setStorageSync('score', total_score);
|
|
|
let url = '/portal/Send/answer';
|
...
|
...
|
@@ -120,7 +120,7 @@ Page({ |
|
|
formId:e.detail.formId
|
|
|
};
|
|
|
app.post(url, params, {}).then((res) => {
|
|
|
console.log('提交答案', res);
|
|
|
// console.log('提交答案', res);
|
|
|
if (+res.code === 1) {
|
|
|
wx.showToast({title:'提交成功',icon:'success',
|
|
|
success:function () {
|
...
|
...
|
|