diff --git a/src/components/CustomOperateModel/index.tsx b/src/components/CustomOperateModel/index.tsx index 5d52d94c8..856758044 100644 --- a/src/components/CustomOperateModel/index.tsx +++ b/src/components/CustomOperateModel/index.tsx @@ -124,13 +124,12 @@ const CustomOperateModel: FC = ({ dispatch, user, globalSetting }) => key: 7, path: '/users' }] - useEffect(() => { - console.log(globalSetting?.operateModelPath, user?.userInfo?.login, 11444) - if (!!globalSetting?.operateModelPath && user?.userInfo?.login) { - getData(); - } - - }, [globalSetting?.operateModelPath, user?.userInfo?.login]) + // useEffect(() => { + // console.log(globalSetting?.operateModelPath, user?.userInfo?.login, 11444) + // if (!!globalSetting?.operateModelPath && user?.userInfo?.login) { + // getData(); + // } + // }, [globalSetting?.operateModelPath, user?.userInfo?.login]) useEffect(() => { return () => { diff --git a/src/layouts/index.tsx b/src/layouts/index.tsx index 7241e8760..6545930e0 100644 --- a/src/layouts/index.tsx +++ b/src/layouts/index.tsx @@ -57,7 +57,6 @@ const SimpleLayouts: FC = ({ loading, globalSetting, children, user, useEffect(()=>{ delCookie("logintrustie"); - console.log("清除了"); if(user?.userInfo?.profile_completed){ getEducoderUserInfo(); } @@ -88,7 +87,6 @@ const SimpleLayouts: FC = ({ loading, globalSetting, children, user, useEffect(() => { delCookie("logintrustie"); - console.log("清除了"); getData(); }, [location.pathname]) useEffect(() => { diff --git a/src/pages/Competitions/Detail/index.tsx b/src/pages/Competitions/Detail/index.tsx index 1a4968ce7..f15a2f6c2 100644 --- a/src/pages/Competitions/Detail/index.tsx +++ b/src/pages/Competitions/Detail/index.tsx @@ -171,11 +171,16 @@ const competitionDetails: FC = ({ 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 ){ + + let filterlist = filterArr && filterArr.length >0 && filterArr[0].list; + + if(filterArr && filterArr.length >0 && (filterlist && filterlist.length>1)){ setSubComShow(true); setSubComList(filterArr[0]); return; + }else if(filterArr && filterArr.length >0 && (filterlist && filterlist.length===1)){ + window.location.href=filterArr[0].list[0].url; + return; } } } @@ -189,9 +194,9 @@ const competitionDetails: FC = ({ }) return } - // if(item.identifier === "gcc_2022_projects_type2" || item.identifier === "gcc_2022_projects_type1"){ - // let arr = HeaderDetail.competition_modules?.filter((item:any)=>item.name === "赛事发布"); - // arr && arr.length > 0 && getrightdatas(arr[0]); + // if(item.identifier === "gcc-courses-2022"){ + // let arr = HeaderDetail.competition_modules?.filter((item:any)=>item.name === "赛事发布"); + // arr && arr.length > 0 && getrightdatas(arr[0]); // return; // } if (url === "ismodel") {