Merge pull request 'glcc 报名两个课题+课题项目url屏蔽' (#538) from durian/forgeplus-react:gitlink_server into gitlink_server

This commit is contained in:
durian 2023-06-02 09:35:20 +08:00
commit 78cecb54d3
3 changed files with 4365 additions and 5356 deletions

9706
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -172,9 +172,9 @@ const Glcc = (propsF) => {
//
if(lockedTaskName){
message.error(`由于你已入选 ${lockedTaskName} 课题,无法申请其他课题`);
}else if(applyTaskId && Object.keys(applyTaskId).length >= 3){
//
message.error('最多只能同时报名个课题');
}else if(applyTaskId && Object.keys(applyTaskId).length >= 2){
//
message.error('最多只能同时报名个课题');
}else{
//
window.location.href=`/glcc/student/apply/${id}`;
@ -225,7 +225,7 @@ const Glcc = (propsF) => {
<Route
path="/glcc/:id/projects"
render={(props) => (
<Project period={period} round={round} {...propsF} {...props} isStudentApplyDate={isStudentApplyDate} secondStudentApplyDate={secondStudentApplyDate} applyTaskId={applyTaskId} setStudentInfoReset={setStudentInfoReset} applyTask={applyTask}/>
<Project repoPublic={repoPublic} period={period} round={round} {...propsF} {...props} isStudentApplyDate={isStudentApplyDate} secondStudentApplyDate={secondStudentApplyDate} applyTaskId={applyTaskId} setStudentInfoReset={setStudentInfoReset} applyTask={applyTask}/>
)}
></Route>
@ -233,7 +233,7 @@ const Glcc = (propsF) => {
<Route
path="/glcc/:id/subjects"
render={(props) => (
<Project period={period} round={round} {...propsF} {...props} isStudentApplyDate={isStudentApplyDate} secondStudentApplyDate={secondStudentApplyDate} applyTaskId={applyTaskId} setStudentInfoReset={setStudentInfoReset} cancelCount={cancelCount} applyTask={applyTask}/>
<Project repoPublic={repoPublic} period={period} round={round} {...propsF} {...props} isStudentApplyDate={isStudentApplyDate} secondStudentApplyDate={secondStudentApplyDate} applyTaskId={applyTaskId} setStudentInfoReset={setStudentInfoReset} cancelCount={cancelCount} applyTask={applyTask}/>
)}
></Route>

View File

@ -20,8 +20,11 @@ const TaskList = Loadable({
});
function Project(propsF) {
const {location, match:{params:{id}}} = propsF;
const {location, match:{params:{id}}, repoPublic, history} = propsF;
const {pathname} = location;
if(id==="2023" && !repoPublic){
history.push('/glcc')
}
useEffect(()=>{
window.scrollTo(0, 0);
},[])