diff --git a/package-lock.json b/package-lock.json index 2bf74946..3d378b13 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19534,15 +19534,13 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true, - "optional": true + "dev": true }, "is-glob": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", "dev": true, - "optional": true, "requires": { "is-extglob": "^2.1.1" } diff --git a/src/military/competition/management/ccks.jsx b/src/military/competition/management/ccks.jsx index 234508a2..08375d9e 100644 --- a/src/military/competition/management/ccks.jsx +++ b/src/military/competition/management/ccks.jsx @@ -130,6 +130,7 @@ function Introduce({ history: { location: { pathname } }, qzDetail, match }) { >} {text === 1 && } {text === 2 && } + {text === 3 && } } } diff --git a/src/military/competition/rank/index.jsx b/src/military/competition/rank/index.jsx index b09fc8f3..4270e228 100644 --- a/src/military/competition/rank/index.jsx +++ b/src/military/competition/rank/index.jsx @@ -37,7 +37,7 @@ function Rank({ isLocal, match }) { dataIndex: 'leader', }, { - title: '三元组个数', + title: '重复三元组个数', dataIndex: 'other_score_1', className: 'textCenter', }, diff --git a/src/military/javaFetch.js b/src/military/javaFetch.js index 1930e9e7..e50a3cc9 100644 --- a/src/military/javaFetch.js +++ b/src/military/javaFetch.js @@ -97,7 +97,8 @@ service.interceptors.response.use( message: "提示", description: res.data.message || '无权限!', }); - if(window.location.port !== "3007"){ + if(window.location.port !== "3007" && !res.config.url.startsWith('/api/tasks/getTask/')){ + // console.log(res); window.location.href="/403"; } return Promise.reject('error'); diff --git a/src/military/task/taskDetail/index.jsx b/src/military/task/taskDetail/index.jsx index 2003752a..ed344dfc 100644 --- a/src/military/task/taskDetail/index.jsx +++ b/src/military/task/taskDetail/index.jsx @@ -29,7 +29,7 @@ for (const item of applyStatusAllArr) { export default Form.create()( forwardRef((props, ref) => { - const { match, current_user, form, history, showNotification, mygetHelmetapi } = props; + const { match, current_user, form, history, showNotification, mygetHelmetapi ,showLoginDialog} = props; const id = match.params.taskId; const { getFieldDecorator, validateFields, setFieldsValue } = form; @@ -57,6 +57,11 @@ export default Form.create()( // 已发布评审任务 评审规则 const [publishedReviewRules, setPublishedReviewRules] = useState(undefined); + useEffect(()=>{ + !current_user.login&&showLoginDialog(); + },[current_user.login]); + + // 获取任务领域配置数据 useEffect(() => { getTaskCategory().then(data => { @@ -87,21 +92,21 @@ export default Form.create()( // 检查用户是否同意协议 useEffect(() => { - current_user.user_id && id && checkAgreement(id).then(res => { + current_user.login && id && checkAgreement(id).then(res => { if (res && res.data && res.data.status === 1) { setSignAgreement(true); } }) - }, [current_user.user_id]); + }, [current_user.login]); // 检查用户是否上传成果 useEffect(() => { - current_user.user_id && id && checkHavePaper(id).then(res => { + current_user.login && id && checkHavePaper(id).then(res => { if (res && res.data && res.data.status === 1) { setIsPaper(true); } }) - }, [current_user.user_id]); + }, [current_user.login]); const taskLimit = useMemo(() => { if (current_user.admin) { @@ -114,7 +119,7 @@ export default Form.create()( // 获取协议内容 useEffect(() => { - applyModal && getAgreement(1).then(res => { + applyModal&¤t_user.login && getAgreement(1).then(res => { if (res && res.data) { setApplyContent({ title: res.data.title, @@ -122,12 +127,12 @@ export default Form.create()( }); } }); - }, [applyModal]); + }, [applyModal,current_user.login]); // 获取成果列表 useEffect(() => { // 等加载完成果详情再加载成果列表 - if (detailData.id) { + if (detailData.id && current_user.login) { setLoading(true); let params = { taskId: id, @@ -150,7 +155,7 @@ export default Form.create()( setTotal(data.total); }); } - }, [id, status, curPage, reload, relaodChildList, detailData]); + }, [id, status, curPage, reload, relaodChildList, detailData ,current_user.login]); // 流程步骤显示,返回剩余时间 @@ -473,10 +478,14 @@ export default Form.create()( } - {!current_user.enterpriseCertification &&
+ {!current_user.enterpriseCertification && current_user.login &&
请先完善主体信息
} + {!current_user.login &&
+ 创客任务仅限登录用户查看,请先注册登录红山开源账号! +
} + {current_user.enterpriseCertification && detailData.status === 3 && (!detailData.exceptClosedBoolean) && signContent()}
diff --git a/src/modules/403/Shixunauthority.js b/src/modules/403/Shixunauthority.js index 1e781f45..38e1a791 100644 --- a/src/modules/403/Shixunauthority.js +++ b/src/modules/403/Shixunauthority.js @@ -11,7 +11,7 @@ class Shixunauthority extends Component { {/*mt100 mb100*/}

- 您可以稍后尝试 返回首页 {/* ,或者