|
|
@ -183,9 +183,13 @@ class ShixunEditor extends Component{
|
|
|
|
|
|
|
|
|
|
|
|
// 新建的时候初始化数组
|
|
|
|
// 新建的时候初始化数组
|
|
|
|
// question_scores.length = chLen
|
|
|
|
// question_scores.length = chLen
|
|
|
|
const newArray = [];
|
|
|
|
let newArray = [];
|
|
|
|
while(chLen--) {
|
|
|
|
if (question_scores && question_scores.length && question_scores[0]) {
|
|
|
|
newArray.push(5)
|
|
|
|
newArray = question_scores;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
while(chLen--) {
|
|
|
|
|
|
|
|
newArray.push(5)
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.setState({ ...response.data, question_scores: newArray })
|
|
|
|
this.setState({ ...response.data, question_scores: newArray })
|
|
|
|
}
|
|
|
|
}
|
|
|
|