forked from Gitlink/forgeplus-react
结项判断
This commit is contained in:
parent
efcfe64da7
commit
d028649388
|
|
@ -44,12 +44,14 @@ function StudentSubmit(props){
|
|||
const [isAuthed, setIsAuthed] = useState(false);
|
||||
|
||||
useEffect(()=>{
|
||||
hasFinalExam({round:currentRound,userId:current_user.user_id}).then((res)=>{
|
||||
if(res && res.data && res.data.hasRole) return;
|
||||
history.push("/glcc");
|
||||
}).catch((err)=>{
|
||||
history.push("/glcc");
|
||||
})
|
||||
if(period != "mediumExamine1"){
|
||||
hasFinalExam({round:currentRound,userId:current_user.user_id}).then((res)=>{
|
||||
if(res && res.data && res.data.hasRole) return;
|
||||
history.push("/glcc");
|
||||
}).catch((err)=>{
|
||||
history.push("/glcc");
|
||||
})
|
||||
}
|
||||
},[])
|
||||
|
||||
useEffect(()=>{
|
||||
|
|
@ -143,25 +145,23 @@ function StudentSubmit(props){
|
|||
},
|
||||
})
|
||||
.then((response) => {
|
||||
if (response) {
|
||||
if (response.data.state && response.data.state.length > 0) {
|
||||
callback("");
|
||||
const description = (
|
||||
<div
|
||||
dangerouslySetInnerHTML={{ __html: response.data.state_html }}
|
||||
></div>
|
||||
);
|
||||
notification.open({
|
||||
message: "提示",
|
||||
description,
|
||||
key:'notificationKey',
|
||||
style: {
|
||||
zIndex: 99999999,
|
||||
},
|
||||
});
|
||||
}
|
||||
callback();
|
||||
if (response && response.data && response.data.state && response.data.state.length > 0) {
|
||||
callback("");
|
||||
const description = (
|
||||
<div
|
||||
dangerouslySetInnerHTML={{ __html: response.data.state_html }}
|
||||
></div>
|
||||
);
|
||||
notification.open({
|
||||
message: "提示",
|
||||
description,
|
||||
key:'notificationKey',
|
||||
style: {
|
||||
zIndex: 99999999,
|
||||
},
|
||||
});
|
||||
}
|
||||
callback();
|
||||
});
|
||||
} else {
|
||||
callback("请输入视频链接");
|
||||
|
|
|
|||
Loading…
Reference in New Issue