dev_aliyun_beta
杨树林 6 years ago
parent 06e73a5ab8
commit a95bd30fd7

@ -1828,17 +1828,21 @@ class PollNew extends Component {
question_other_answer: null, question_other_answer: null,
insert_id: insert_id insert_id: insert_id
} }
if(number&&number===2){ try {
datay={ if(number===2){
question_title: object.question.question_title, datay={
question_type: number, question_title: object.question.question_title,
is_necessary: object.question.is_necessary, question_type: number,
max_choices: max_choicess===undefined?length:max_choicess===null?length:max_choicess===0?length:max_choicess, is_necessary: object.question.is_necessary,
min_choices: min_choicess===undefined?2:min_choicess===null?2:min_choicess===0?2:min_choicess, max_choices: max_choicess===undefined?length:max_choicess===null?length:max_choicess===0?length:max_choicess,
question_answers: option, min_choices: min_choicess===undefined?2:min_choicess===null?2:min_choicess===0?2:min_choicess,
question_other_answer: null, question_answers: option,
insert_id: insert_id question_other_answer: null,
insert_id: insert_id
}
} }
}catch (e) {
} }
axios.post(urlly, datay).then((result) => { axios.post(urlly, datay).then((result) => {
@ -1900,19 +1904,24 @@ class PollNew extends Component {
question_answers: option, question_answers: option,
question_other_answer: null, question_other_answer: null,
}; };
if(number&&number===2){ try {
datay={ if(number===2){
// debug: true, datay={
question_title: object.question.question_title, // debug: true,
question_type: number, question_title: object.question.question_title,
is_necessary: object.question.is_necessary, question_type: number,
max_choices: max_choicess===undefined?length:max_choicess===null?length:max_choicess===0?length:max_choicess, is_necessary: object.question.is_necessary,
min_choices: min_choicess===undefined?2:min_choicess===null?2:min_choicess===0?2:min_choicess, max_choices: max_choicess===undefined?length:max_choicess===null?length:max_choicess===0?length:max_choicess,
question_answers: option, min_choices: min_choicess===undefined?2:min_choicess===null?2:min_choicess===0?2:min_choicess,
question_other_answer: null, question_answers: option,
}; question_other_answer: null,
};
}
}catch (e) {
} }
axios.put(url,datay ).then((result) => {
axios.put(url,datay).then((result) => {
try { try {
if (result.data.status === 0) { if (result.data.status === 0) {
this.props.showNotification(`编辑题目成功`); this.props.showNotification(`编辑题目成功`);

Loading…
Cancel
Save