competitions
杨树明 5 years ago
parent 9d916adf72
commit 36c7746893

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

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

Loading…
Cancel
Save