forked from Gitlink/forgeplus-react
Merge pull request '修改登录提示' (#415) from tongChong/forgeplus-react:dev_military_admin into pre_dev_military
This commit is contained in:
commit
b19e4c0b3c
|
@ -97,7 +97,8 @@ service.interceptors.response.use(
|
||||||
message: "提示",
|
message: "提示",
|
||||||
description: res.data.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";
|
window.location.href="/403";
|
||||||
}
|
}
|
||||||
return Promise.reject('error');
|
return Promise.reject('error');
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
.chuangke_icon{
|
.chuangke_icon{
|
||||||
position: relative;
|
position: relative;
|
||||||
top:-10px;
|
top:-10px;
|
||||||
|
margin-left: -40px;
|
||||||
}
|
}
|
||||||
// .chuangke_icon{
|
// .chuangke_icon{
|
||||||
// position: relative;
|
// position: relative;
|
||||||
|
|
|
@ -29,7 +29,7 @@ for (const item of applyStatusAllArr) {
|
||||||
|
|
||||||
export default Form.create()(
|
export default Form.create()(
|
||||||
forwardRef((props, ref) => {
|
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 id = match.params.taskId;
|
||||||
const { getFieldDecorator, validateFields, setFieldsValue } = form;
|
const { getFieldDecorator, validateFields, setFieldsValue } = form;
|
||||||
|
|
||||||
|
@ -57,6 +57,11 @@ export default Form.create()(
|
||||||
// 已发布评审任务 评审规则
|
// 已发布评审任务 评审规则
|
||||||
const [publishedReviewRules, setPublishedReviewRules] = useState(undefined);
|
const [publishedReviewRules, setPublishedReviewRules] = useState(undefined);
|
||||||
|
|
||||||
|
useEffect(()=>{
|
||||||
|
!current_user.login&&showLoginDialog();
|
||||||
|
},[current_user.login]);
|
||||||
|
|
||||||
|
|
||||||
// 获取任务领域配置数据
|
// 获取任务领域配置数据
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getTaskCategory().then(data => {
|
getTaskCategory().then(data => {
|
||||||
|
@ -87,21 +92,21 @@ export default Form.create()(
|
||||||
|
|
||||||
// 检查用户是否同意协议
|
// 检查用户是否同意协议
|
||||||
useEffect(() => {
|
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) {
|
if (res && res.data && res.data.status === 1) {
|
||||||
setSignAgreement(true);
|
setSignAgreement(true);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, [current_user.user_id]);
|
}, [current_user.login]);
|
||||||
|
|
||||||
// 检查用户是否上传成果
|
// 检查用户是否上传成果
|
||||||
useEffect(() => {
|
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) {
|
if (res && res.data && res.data.status === 1) {
|
||||||
setIsPaper(true);
|
setIsPaper(true);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, [current_user.user_id]);
|
}, [current_user.login]);
|
||||||
|
|
||||||
const taskLimit = useMemo(() => {
|
const taskLimit = useMemo(() => {
|
||||||
if (current_user.admin) {
|
if (current_user.admin) {
|
||||||
|
@ -114,7 +119,7 @@ export default Form.create()(
|
||||||
|
|
||||||
// 获取协议内容
|
// 获取协议内容
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
applyModal && getAgreement(1).then(res => {
|
applyModal&¤t_user.login && getAgreement(1).then(res => {
|
||||||
if (res && res.data) {
|
if (res && res.data) {
|
||||||
setApplyContent({
|
setApplyContent({
|
||||||
title: res.data.title,
|
title: res.data.title,
|
||||||
|
@ -122,12 +127,12 @@ export default Form.create()(
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}, [applyModal]);
|
}, [applyModal,current_user.login]);
|
||||||
|
|
||||||
// 获取成果列表
|
// 获取成果列表
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// 等加载完成果详情再加载成果列表
|
// 等加载完成果详情再加载成果列表
|
||||||
if (detailData.id) {
|
if (detailData.id && current_user.login) {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
let params = {
|
let params = {
|
||||||
taskId: id,
|
taskId: id,
|
||||||
|
@ -150,7 +155,7 @@ export default Form.create()(
|
||||||
setTotal(data.total);
|
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()(
|
||||||
</React.Fragment>}
|
</React.Fragment>}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{!current_user.enterpriseCertification && <div className="edu-back-white padding30 mt20 font-16 text-center mb50">
|
{!current_user.enterpriseCertification && current_user.login &&<div className="edu-back-white padding30 mt20 font-16 text-center mb50">
|
||||||
<a onClick={goUserProfiles} className="color-blue_41">请先完善主体信息</a>
|
<a onClick={goUserProfiles} className="color-blue_41">请先完善主体信息</a>
|
||||||
</div>}
|
</div>}
|
||||||
|
|
||||||
|
{!current_user.login &&<div className="edu-back-white padding30 mt20 font-16 text-center mb50">
|
||||||
|
<span className="color-blue_41">创客任务仅限登录用户查看,请先注册登录红山开源账号!</span>
|
||||||
|
</div>}
|
||||||
|
|
||||||
{current_user.enterpriseCertification && detailData.status === 3 && (!detailData.exceptClosedBoolean) && signContent()}
|
{current_user.enterpriseCertification && detailData.status === 3 && (!detailData.exceptClosedBoolean) && signContent()}
|
||||||
|
|
||||||
<div className="applyList edu-back-white padding30 mt20">
|
<div className="applyList edu-back-white padding30 mt20">
|
||||||
|
|
|
@ -11,7 +11,7 @@ class Shixunauthority extends Component {
|
||||||
{/*mt100 mb100*/}
|
{/*mt100 mb100*/}
|
||||||
<img src={getImageUrl("images/warn/pic_403.jpg")} />
|
<img src={getImageUrl("images/warn/pic_403.jpg")} />
|
||||||
<p className="font-18 mt40">
|
<p className="font-18 mt40">
|
||||||
您可以稍后尝试 <a href="/"
|
无权限,您可以登录或切换账号后尝试 <a href="/"
|
||||||
className="color-blue">返回首页</a>
|
className="color-blue">返回首页</a>
|
||||||
{/* ,或者
|
{/* ,或者
|
||||||
<a target="_blank"
|
<a target="_blank"
|
||||||
|
|
Loading…
Reference in New Issue