forked from Gitlink/forgeplus-react
fixed实名认证要求
This commit is contained in:
parent
ab38b680bc
commit
6532110684
|
|
@ -89,7 +89,7 @@ const competitionDetails: FC<PageProps> = ({
|
|||
const [isshowmodal,setisshowmodal]=useState<any>(false);
|
||||
const [isAddmodel, setIsAddmodel] = useState<any>(false) //新建战队
|
||||
const [isJoin, setJoin] = useState<any>(false) //加入战队
|
||||
const [isClick,setIsClick]=useState<any>(true)//增加参数 防止点击过快 多次调用
|
||||
const [isClick,setIsClick]=useState<any>(true)//增加参数 防止点击过快 多次调用
|
||||
const [showphone,setshowphone]=useState<any>(false);
|
||||
const [isopen,setisopen]=useState<any>(false);
|
||||
const [datas,setdatas]=useState<any>('');
|
||||
|
|
@ -103,12 +103,12 @@ const competitionDetails: FC<PageProps> = ({
|
|||
setSubGitlinkShow(true);
|
||||
}
|
||||
},[user?.userInfo])
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
if (identifier) {
|
||||
setTimeout(() => {
|
||||
init();
|
||||
}, 200);
|
||||
}, 200);
|
||||
}
|
||||
}, [identifier])
|
||||
|
||||
|
|
@ -166,18 +166,18 @@ const competitionDetails: FC<PageProps> = ({
|
|||
type: 'competitions/getItem',
|
||||
payload: {
|
||||
url: item.module_url,
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
setIsRanKing(false)
|
||||
setIsAward(false)
|
||||
setMdTab(false)
|
||||
setItemData(data);
|
||||
setshowmake(false);
|
||||
setentrance(false)
|
||||
|
||||
|
||||
setModelType(item.module_type);
|
||||
if (item.module_type === "chart") {
|
||||
setIsRanKing(true)
|
||||
|
|
@ -208,10 +208,10 @@ const competitionDetails: FC<PageProps> = ({
|
|||
setIssee(true);
|
||||
localStorage.setItem('issee','1');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
async function gotocourse(e: any, item: any, url: string) {
|
||||
e.stopPropagation();
|
||||
|
|
@ -241,15 +241,15 @@ const competitionDetails: FC<PageProps> = ({
|
|||
}
|
||||
|
||||
|
||||
// if (HeaderDetail?.is_authentication && !user?.userInfo?.authentication) {
|
||||
// dispatch({
|
||||
// type: 'shixunsDetail/setActionTabs',
|
||||
// payload: {
|
||||
// key: 'Banner-Auth',
|
||||
// },
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
if (HeaderDetail?.is_authentication && !user?.userInfo?.authentication) {
|
||||
dispatch({
|
||||
type: 'shixunsDetail/setActionTabs',
|
||||
payload: {
|
||||
key: 'Banner-Auth',
|
||||
},
|
||||
})
|
||||
return
|
||||
}
|
||||
if (HeaderDetail?.enroll_url) {
|
||||
openNewWindow(HeaderDetail?.enroll_url);
|
||||
return
|
||||
|
|
@ -274,7 +274,7 @@ const competitionDetails: FC<PageProps> = ({
|
|||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
|
||||
if (StaffDetail.enrolled === true) {
|
||||
openNewWindow(url)
|
||||
return;
|
||||
|
|
@ -320,7 +320,7 @@ const competitionDetails: FC<PageProps> = ({
|
|||
// owner:user?.userInfo?.login
|
||||
// }
|
||||
// })
|
||||
// // data.data ||
|
||||
// // data.data ||
|
||||
// let a = data.data;
|
||||
// console.log(a);
|
||||
// let filter = a.filter((i:any)=>i === identifier.toString());
|
||||
|
|
@ -392,7 +392,7 @@ const competitionDetails: FC<PageProps> = ({
|
|||
|
||||
|
||||
async function getTabResults() {
|
||||
|
||||
|
||||
setTabResults(
|
||||
await dispatch({
|
||||
type: 'competitions/TabResults',
|
||||
|
|
@ -588,8 +588,8 @@ async function JoinTeams(name: any) {
|
|||
}
|
||||
}>{StaffDetail.enrolled ? HeaderDetail.need_attachment ? '上传作品' : '已报名' : HeaderDetail?.enroll_url ? '前往大赛官网报名' : '立即报名'}</Button> : null}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
{user.userInfo.real_name != "游客" && !HeaderDetail?.enroll_url && <span onClick={(e) => gotocourse(e, HeaderDetail, HeaderDetail.mode === 2 ? 'ismodel' : HeaderDetail.personal ? 'personal' : `/competitions/index/${HeaderDetail.identifier}/enroll`)} className={styles.myteam}>{isSuperAdmin() ? '参赛战队>>' : '我的战队>>'}</span>}
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -686,9 +686,9 @@ async function JoinTeams(name: any) {
|
|||
setHeaderDetail(res)
|
||||
|
||||
}} />
|
||||
<ClaModal
|
||||
visible={visible}
|
||||
onCancel={()=>{setVisible(false)}}
|
||||
<ClaModal
|
||||
visible={visible}
|
||||
onCancel={()=>{setVisible(false)}}
|
||||
onOk={()=>{
|
||||
setVisible(false);
|
||||
setisshowmodal(true);
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ const competitionsIndexPage: FC<PageProps> = ({
|
|||
const [isshowmodal, setisshowmodal] = useState<any>(false);
|
||||
const [isAddmodel, setIsAddmodel] = useState<any>(false) //新建战队
|
||||
const [isJoin, setJoin] = useState<any>(false) //加入战队
|
||||
const [isClick, setIsClick] = useState<any>(true)//增加参数 防止点击过快 多次调用
|
||||
const [isClick, setIsClick] = useState<any>(true)//增加参数 防止点击过快 多次调用
|
||||
let [items, setitems] = useState<any>([]);
|
||||
const [showphone,setshowphone]=useState<any>(false);
|
||||
const [isopen,setisopen]=useState<any>(false)
|
||||
|
|
@ -134,15 +134,15 @@ const competitionsIndexPage: FC<PageProps> = ({
|
|||
if (!handleVerify(dispatch)) {
|
||||
return;
|
||||
}
|
||||
// if (item?.is_authentication && !user?.userInfo?.authentication) {
|
||||
// dispatch({
|
||||
// type: 'shixunsDetail/setActionTabs',
|
||||
// payload: {
|
||||
// key: 'Banner-Auth',
|
||||
// },
|
||||
// });
|
||||
// return;
|
||||
// }
|
||||
if (item?.is_authentication && !user?.userInfo?.authentication) {
|
||||
dispatch({
|
||||
type: 'shixunsDetail/setActionTabs',
|
||||
payload: {
|
||||
key: 'Banner-Auth',
|
||||
},
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (url === 'ismodel') {
|
||||
if (item.member_of_course === true) {
|
||||
openNewWindow(`/classrooms/${item.course_id}`);
|
||||
|
|
@ -324,7 +324,7 @@ const competitionsIndexPage: FC<PageProps> = ({
|
|||
setshowphone(true)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
let data =await dispatch({
|
||||
type: 'competitions/GetKylinId',
|
||||
payload: {
|
||||
|
|
@ -649,9 +649,9 @@ const competitionsIndexPage: FC<PageProps> = ({
|
|||
payload: { ...competitions.listParams },
|
||||
});
|
||||
}} />
|
||||
<ClaModal
|
||||
visible={visible}
|
||||
onCancel={()=>{setVisible(false)}}
|
||||
<ClaModal
|
||||
visible={visible}
|
||||
onCancel={()=>{setVisible(false)}}
|
||||
onOk={()=>{
|
||||
setVisible(false);
|
||||
setisshowmodal(true);
|
||||
|
|
|
|||
Loading…
Reference in New Issue