forked from Gitlink/forgeplus-react
子竞赛弹框
This commit is contained in:
parent
6fb0214e9b
commit
937e219a12
|
@ -34,6 +34,7 @@ import InitGitLink from './components/InitGitLink'
|
|||
import PhoneModal from '../components/PhoneModal'
|
||||
import env from '@/utils/env';
|
||||
import ClaModal from '../components/ClaModal';
|
||||
import SubCompetition from './components/SubCompetition';
|
||||
|
||||
interface PageProps extends ConnectProps {
|
||||
globalSetting: GlobalSettingModelState;
|
||||
|
@ -85,6 +86,8 @@ const competitionDetails: FC<PageProps> = ({
|
|||
const [entrance,setentrance]=useState<any>(false)
|
||||
const [ subGitlinkShow , setSubGitlinkShow ] =useState<any>(false);
|
||||
|
||||
const [ subComShow , setSubComShow ] = useState<any>(false);
|
||||
const [ subComList , setSubComList] = useState<any>([]);
|
||||
|
||||
const [isshowmodal,setisshowmodal]=useState<any>(false);
|
||||
const [isAddmodel, setIsAddmodel] = useState<any>(false) //新建战队
|
||||
|
@ -223,11 +226,19 @@ const competitionDetails: FC<PageProps> = ({
|
|||
setshowphone(true)
|
||||
return
|
||||
}
|
||||
if(item.identifier === "track4_2023" || item.identifier === "track2_2023" || item.identifier === "track1_2023"){
|
||||
openNewWindow(`/competitions/index/${item.identifier}`);
|
||||
return;
|
||||
|
||||
if(globalSetting?.setting?.sub_competitions){
|
||||
let subArr = globalSetting?.setting?.sub_competitions;
|
||||
if(subArr.length>0){
|
||||
let filterArr = subArr.filter((i:any)=>i.identifier === item.identifier);
|
||||
console.log(filterArr);
|
||||
if(filterArr && filterArr.length >0 ){
|
||||
setSubComShow(true);
|
||||
setSubComList(filterArr[0]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let data =await dispatch({
|
||||
type: 'competitions/GetKylinId',
|
||||
payload: {
|
||||
|
@ -530,6 +541,7 @@ async function JoinTeams(name: any) {
|
|||
|
||||
return (
|
||||
<div className={"edu-container minH500"}>
|
||||
<SubCompetition visible={subComShow} onClose={()=>setSubComShow(false)} filterlist={subComList}/>
|
||||
<InitGitLink visible={subGitlinkShow} onClose={()=>setSubGitlinkShow(false)}/>
|
||||
<Breadcrumb className="mt10" separator=">">
|
||||
<Breadcrumb.Item><Link to={"/competitions/index"}>在线竞赛</Link></Breadcrumb.Item>
|
||||
|
|
|
@ -324,10 +324,7 @@ const competitionsIndexPage: FC<PageProps> = ({
|
|||
setshowphone(true)
|
||||
return
|
||||
}
|
||||
if(item.identifier === "track4_2023" || item.identifier === "track2_2023" || item.identifier === "track1_2023"){
|
||||
openNewWindow(`/competitions/index/${item.identifier}`);
|
||||
return;
|
||||
}
|
||||
|
||||
let data =await dispatch({
|
||||
type: 'competitions/GetKylinId',
|
||||
payload: {
|
||||
|
|
Loading…
Reference in New Issue