Commit 07854278 authored by zhangjianqian's avatar zhangjianqian

访客录入考题bug

parent 4eb5096c
......@@ -328,7 +328,8 @@ export default {
this.$refs.visitorAdd.form.questions
);
// data.answer = this.$refs.visitorAdd.answerNum;
data.answer = JSON.stringify(this.$refs.visitorAdd.answerNum);
data.answer = Array.isArray( this.$refs.visitorAdd.answerNum )?JSON.stringify(this.$refs.visitorAdd.answerNum):this.$refs.visitorAdd.answerNum;
data.topicType = this.$refs.visitorAdd.form.topicType;
// console.log()
......@@ -381,7 +382,8 @@ export default {
questions: JSON.parse(data.topicOption),
};
console.log(data);
this.$refs.visitorAdd.answerNum = data.answer;
this.$refs.visitorAdd.answerNum = JSON.parse(data.answer);
console.log(this.$refs.visitorAdd.answerNum)
});
this.$nextTick(() => {
this.$refs.visitorAdd.questionNextNum = index;
......
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