Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_hjm_a
cxt 5 years ago
commit 3ceba29352

@ -84,9 +84,9 @@ export function initAxiosInterceptors(props) {
}
config.url = `${proxy}${url}`;
if (config.url.indexOf('?') == -1) {
config.url = `${config.url}?debug=${debugType}`;
config.url = `${config.url}?debug=${'student'}`;
} else {
config.url = `${config.url}&debug=${debugType}`;
config.url = `${config.url}&debug=${'student'}`;
}
} else {
// 加api前缀

@ -127,25 +127,25 @@ class ExerciseReviewAndAnswer extends Component{
}
//自动交卷
autoCommitExercise=()=>{
let eId=this.props.match.params.Id;
let url=`/exercises/${eId}/commit_exercise.json`;
axios.post(url,{
let eId=this.props.match.params.Id;
let url=`/exercises/${eId}/commit_exercise.json`;
axios.post(url,{
commit_method:2
}).then((result)=>{
if(result){
this.setState({
Modalstype:true,
Modalstopval:'答题结束了,系统已自动提交试卷',
modalsBottomval:"不能再修改答题",
ModalCancel:undefined,
ModalSave:this.sureCommit,
Loadtype:true
})
if(result){
this.setState({
Modalstype:true,
Modalstopval:'答题结束了,系统已自动提交试卷',
modalsBottomval:"不能再修改答题",
ModalCancel:undefined,
ModalSave:this.sureCommit,
Loadtype:true
})
this.props.showNotification(`${result.data.message}`);
}
}).catch((error)=>{
console.log(error);
})
}
}).catch((error)=>{
console.log(error);
})
}
sureCommit=()=>{

Loading…
Cancel
Save