forked from Gitlink/forgeplus-react
sub_competitions
This commit is contained in:
parent
772b736ad6
commit
7eee378218
|
@ -124,13 +124,12 @@ const CustomOperateModel: FC<PageProps> = ({ 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 () => {
|
||||
|
|
|
@ -57,7 +57,6 @@ const SimpleLayouts: FC<PageProps> = ({ loading, globalSetting, children, user,
|
|||
|
||||
useEffect(()=>{
|
||||
delCookie("logintrustie");
|
||||
console.log("清除了");
|
||||
if(user?.userInfo?.profile_completed){
|
||||
getEducoderUserInfo();
|
||||
}
|
||||
|
@ -88,7 +87,6 @@ const SimpleLayouts: FC<PageProps> = ({ loading, globalSetting, children, user,
|
|||
|
||||
useEffect(() => {
|
||||
delCookie("logintrustie");
|
||||
console.log("清除了");
|
||||
getData();
|
||||
}, [location.pathname])
|
||||
useEffect(() => {
|
||||
|
|
|
@ -171,11 +171,16 @@ const competitionDetails: FC<PageProps> = ({
|
|||
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<PageProps> = ({
|
|||
})
|
||||
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") {
|
||||
|
|
Loading…
Reference in New Issue