forked from Gitlink/forgeplus-react
detail update
This commit is contained in:
parent
937e219a12
commit
322fbb3f03
|
@ -39,7 +39,7 @@ const AuthModal: FC<PageProps> = ({
|
||||||
type: 'shixunsDetail/setActionTabs',
|
type: 'shixunsDetail/setActionTabs',
|
||||||
payload: {},
|
payload: {},
|
||||||
});
|
});
|
||||||
window.location.href = '/account/certification';
|
window.location.href = 'https://www.educoder.net/account/certification';
|
||||||
}}
|
}}
|
||||||
onCancel={() => {
|
onCancel={() => {
|
||||||
dispatch({
|
dispatch({
|
||||||
|
|
|
@ -231,7 +231,6 @@ const competitionDetails: FC<PageProps> = ({
|
||||||
let subArr = globalSetting?.setting?.sub_competitions;
|
let subArr = globalSetting?.setting?.sub_competitions;
|
||||||
if(subArr.length>0){
|
if(subArr.length>0){
|
||||||
let filterArr = subArr.filter((i:any)=>i.identifier === item.identifier);
|
let filterArr = subArr.filter((i:any)=>i.identifier === item.identifier);
|
||||||
console.log(filterArr);
|
|
||||||
if(filterArr && filterArr.length >0 ){
|
if(filterArr && filterArr.length >0 ){
|
||||||
setSubComShow(true);
|
setSubComShow(true);
|
||||||
setSubComList(filterArr[0]);
|
setSubComList(filterArr[0]);
|
||||||
|
@ -536,12 +535,12 @@ async function JoinTeams(name: any) {
|
||||||
setIsClick(true);
|
setIsClick(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// console.log('-------',useLocation().query.type);
|
// console.log('-------',(HeaderDetail.identifier === "track1_2023" || HeaderDetail.identifier === "track2_2023" || HeaderDetail.identifier === "track4_2023" )?false:(StaffDetail.enrolled && !HeaderDetail.need_attachment));
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={"edu-container minH500"}>
|
<div className={"edu-container minH500"}>
|
||||||
<SubCompetition visible={subComShow} onClose={()=>setSubComShow(false)} filterlist={subComList}/>
|
< SubCompetition visible={subComShow} onClose={()=>setSubComShow(false)} filterlist={subComList}/>
|
||||||
<InitGitLink visible={subGitlinkShow} onClose={()=>setSubGitlinkShow(false)}/>
|
<InitGitLink visible={subGitlinkShow} onClose={()=>setSubGitlinkShow(false)}/>
|
||||||
<Breadcrumb className="mt10" separator=">">
|
<Breadcrumb className="mt10" separator=">">
|
||||||
<Breadcrumb.Item><Link to={"/competitions/index"}>在线竞赛</Link></Breadcrumb.Item>
|
<Breadcrumb.Item><Link to={"/competitions/index"}>在线竞赛</Link></Breadcrumb.Item>
|
||||||
|
@ -594,7 +593,12 @@ async function JoinTeams(name: any) {
|
||||||
{HeaderDetail.competition_status === "ended" ? <Button type="primary" className={styles.buttonsize} disabled={true} >已结束</Button> : null}
|
{HeaderDetail.competition_status === "ended" ? <Button type="primary" className={styles.buttonsize} disabled={true} >已结束</Button> : null}
|
||||||
{HeaderDetail.competition_status === 'nearly_published' ? <Button type="primary" className={styles.buttonsize} disabled={true} >未发布</Button> : null}
|
{HeaderDetail.competition_status === 'nearly_published' ? <Button type="primary" className={styles.buttonsize} disabled={true} >未发布</Button> : null}
|
||||||
{HeaderDetail.competition_status !== 'nearly_published' && HeaderDetail.enroll_end && HeaderDetail.competition_status !== 'ended' ? <Button type="primary" className={styles.buttonsize} disabled={true} >报名截止</Button> : null}
|
{HeaderDetail.competition_status !== 'nearly_published' && HeaderDetail.enroll_end && HeaderDetail.competition_status !== 'ended' ? <Button type="primary" className={styles.buttonsize} disabled={true} >报名截止</Button> : null}
|
||||||
{HeaderDetail.competition_status === 'progressing' && HeaderDetail.enroll_end != true ? <Button type="primary" disabled={StaffDetail.enrolled && !HeaderDetail.need_attachment} className={styles.buttonsize} onClick={
|
{HeaderDetail.competition_status === 'progressing' && HeaderDetail.enroll_end != true ?
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
disabled={(HeaderDetail.identifier === "track1_2023" || HeaderDetail.identifier === "track2_2023" || HeaderDetail.identifier === "track4_2023" )?false:(StaffDetail.enrolled && !HeaderDetail.need_attachment)}
|
||||||
|
className={styles.buttonsize}
|
||||||
|
onClick={
|
||||||
(e) => {
|
(e) => {
|
||||||
if (StaffDetail.enrolled && HeaderDetail.need_attachment) {
|
if (StaffDetail.enrolled && HeaderDetail.need_attachment) {
|
||||||
see.current?.handleVisible()
|
see.current?.handleVisible()
|
||||||
|
@ -602,7 +606,7 @@ async function JoinTeams(name: any) {
|
||||||
}
|
}
|
||||||
gotocourse(e, HeaderDetail, HeaderDetail.mode === 2 ? 'ismodel' : HeaderDetail.personal ? 'personal' : `/competitions/index/${HeaderDetail.identifier}/enroll`)
|
gotocourse(e, HeaderDetail, HeaderDetail.mode === 2 ? 'ismodel' : HeaderDetail.personal ? 'personal' : `/competitions/index/${HeaderDetail.identifier}/enroll`)
|
||||||
}
|
}
|
||||||
}>{StaffDetail.enrolled ? HeaderDetail.need_attachment ? '上传作品' : '已报名' : HeaderDetail?.enroll_url ? '前往大赛官网报名' : '立即报名'}</Button> : null}
|
}>{StaffDetail.enrolled ? ((HeaderDetail.identifier === "track1_2023" || HeaderDetail.identifier === "track2_2023" || HeaderDetail.identifier === "track4_2023" ) ? "立即报名" : HeaderDetail.need_attachment ? '上传作品' : '已报名') : (HeaderDetail?.enroll_url ? '前往大赛官网报名' : '立即报名')}</Button> : null}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -324,7 +324,10 @@ const competitionsIndexPage: FC<PageProps> = ({
|
||||||
setshowphone(true)
|
setshowphone(true)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if(item.identifier === "track4_2023" || item.identifier === "track2_2023" || item.identifier === "track1_2023"){
|
||||||
|
openNewWindow(`/competitions/index/${item.identifier}`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
let data =await dispatch({
|
let data =await dispatch({
|
||||||
type: 'competitions/GetKylinId',
|
type: 'competitions/GetKylinId',
|
||||||
payload: {
|
payload: {
|
||||||
|
|
Loading…
Reference in New Issue