题库单选题编辑

yslnewtiku
杨树林 5 years ago
parent 29432d8b9c
commit 61abfc07d5

@ -184,7 +184,7 @@ class Questionitem_banks extends Component {
console.log(k);
const choicesdata={
choice_text:anserdata[2][k],
is_answer:anserdata[1]-1===k?0:1,
is_answer:anserdata[1]-1===k?1:0,
}
choices.push(choicesdata);
}
@ -245,7 +245,7 @@ class Questionitem_banks extends Component {
console.log(k);
const choicesdata={
choice_text:anserdata[2][k],
is_answer:anserdata[1]-1===k?0:1,
is_answer:anserdata[1]-1===k?1:0,
}
choices.push(choicesdata);
}
@ -302,13 +302,13 @@ class Questionitem_banks extends Component {
const choices=[];
const choicesdata={
choice_text:"正确",
is_answer:anserdata[1]==="0"?0:1,
is_answer:anserdata[1]==="0"?1:0,
}
choices.push(choicesdata);
const choicesdatas={
choice_text:"错误",
is_answer:anserdata[1]==="1"?0:1,
is_answer:anserdata[1]==="1"?1:0,
}
choices.push(choicesdatas);
var data={

Loading…
Cancel
Save