|
|
|
@ -120,7 +120,9 @@ export default class TPManswer extends Component {
|
|
|
|
|
|
|
|
|
|
let urlAnswer = `/shixuns/${id}/challenges/${checkpointId}/answer.json`;
|
|
|
|
|
axios.get(urlAnswer).then((response) => {
|
|
|
|
|
if (response.data) {
|
|
|
|
|
if (response.data.status === 401) {
|
|
|
|
|
|
|
|
|
|
} else if (response.data) {
|
|
|
|
|
this.setState({ answers: response.data })
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
@ -158,7 +160,7 @@ export default class TPManswer extends Component {
|
|
|
|
|
if (!isValidate) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (totalScore != 100) {
|
|
|
|
|
if (answersParams.length != 0 && totalScore != 100) {
|
|
|
|
|
this.props.showSnackbar("请先保证占比和为100%");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|