|
@@ -22,30 +22,30 @@ const GlobalHeaderRight = (props) => {
|
|
|
className = `${styles.right} ${styles.dark}`;
|
|
|
}
|
|
|
|
|
|
- // useEffect(()=>{
|
|
|
- // let token = window.location.search.split('token=') && window.location.search.split('token=')[1];
|
|
|
- // dispatch({
|
|
|
- // type: 'editReport/getIdByToken',
|
|
|
- // payload: {
|
|
|
- // token
|
|
|
- // }
|
|
|
- // }).then(res=>{
|
|
|
- // //{result: "fail", cause: "身份验证失败,请重新点击按钮进入答题页面"}
|
|
|
- // if(res.result === 'success'){
|
|
|
- // let idInfo = {
|
|
|
- // roleId:res.roleId,
|
|
|
- // caseId:res.caseId,
|
|
|
- // examId:res.examId,
|
|
|
- // userId:res.userId,
|
|
|
- // case_take_id:res.caseId + '-' + res.examId,
|
|
|
- // }
|
|
|
- // setIdInfo(idInfo);
|
|
|
- // }else{
|
|
|
- // //错误处理
|
|
|
- // console.log(res)
|
|
|
- // }
|
|
|
- // })
|
|
|
- // },[])
|
|
|
+ useEffect(()=>{
|
|
|
+ let token = window.location.search.split('token=') && window.location.search.split('token=')[1];
|
|
|
+ dispatch({
|
|
|
+ type: 'editReport/getIdByToken',
|
|
|
+ payload: {
|
|
|
+ token
|
|
|
+ }
|
|
|
+ }).then(res=>{
|
|
|
+ //{result: "fail", cause: "身份验证失败,请重新点击按钮进入答题页面"}
|
|
|
+ if(res.result === 'success'){
|
|
|
+ let idInfo = {
|
|
|
+ roleId:res.roleId,
|
|
|
+ caseId:res.caseId,
|
|
|
+ examId:res.examId,
|
|
|
+ userId:res.userId,
|
|
|
+ case_take_id:res.caseId + '-' + res.examId,
|
|
|
+ }
|
|
|
+ setIdInfo(idInfo);
|
|
|
+ }else{
|
|
|
+ //错误处理
|
|
|
+ console.log(res)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },[])
|
|
|
|
|
|
|
|
|
useEffect(() => {
|