结项判断

This commit is contained in:
namezlx 2023-09-26 09:45:59 +08:00
parent efcfe64da7
commit d028649388
1 changed files with 24 additions and 24 deletions

View File

@ -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("请输入视频链接");