diff --git a/src/common/util/ShareUtil.js b/src/common/util/ShareUtil.js index 3eb42e75..2778b8d2 100644 --- a/src/common/util/ShareUtil.js +++ b/src/common/util/ShareUtil.js @@ -3,7 +3,7 @@ const host = window.location.protocol + '//' + window.location.host const wx = window.wx const appId = 'wxf8debe756b4a0309' -let settings = localStorage.chromesetting&&JSON.parse(localStorage.chromesetting); +let settings = localStorage.chromesetting && localStorage.chromesetting !== 'undefined' && JSON.parse(localStorage.chromesetting); let actionUrl = settings && settings.common.zone +'/api'; const service = axios.create({ diff --git a/src/forge/Server/Index.jsx b/src/forge/Server/Index.jsx index 6712c499..9b47adea 100644 --- a/src/forge/Server/Index.jsx +++ b/src/forge/Server/Index.jsx @@ -40,9 +40,9 @@ function ServerIndex(props){ useEffect(()=>{ // 非项目协作者不可进入服务tab (3397) - // if(projectDetail && projectDetail.permission === ""){ - // props.history.push(`/${owner}/${projectsId}`); - // } + if(projectDetail && projectDetail.permission === ""){ + props.history.push(`/${owner}/${projectsId}`); + } }, [projectDetail]) return( diff --git a/src/forge/Server/List.jsx b/src/forge/Server/List.jsx index 23e6ddf5..9e535d07 100644 --- a/src/forge/Server/List.jsx +++ b/src/forge/Server/List.jsx @@ -17,13 +17,13 @@ function Main(props){ } }, [projectDetail]) - // useEffect(()=>{ - // if(current_user && !current_user.login){ - // props.history.push(`/login?go_page=/${owner}/${projectsId}/service`); - // }else{ - // setHas_trace_user(current_user.has_trace_user); - // } - // },[current_user]) + useEffect(()=>{ + if(current_user && !current_user.login){ + props.history.push(`/login?go_page=/${owner}/${projectsId}/service`); + }else{ + setHas_trace_user(current_user.has_trace_user); + } + },[current_user]) function onOk(){ setVisible(false); @@ -66,7 +66,7 @@ function Main(props){
+
代码质量分析工具
提供自动化的静态代码检查能力,能够识别代码中的缺陷、安全漏洞、代码异味,同时产出代码覆盖率和重复度的详细报告
diff --git a/src/forge/Server/quality/component/ProblemDetail.jsx b/src/forge/Server/quality/component/ProblemDetail.jsx index ca33e79f..bbca4f73 100644 --- a/src/forge/Server/quality/component/ProblemDetail.jsx +++ b/src/forge/Server/quality/component/ProblemDetail.jsx @@ -30,7 +30,7 @@ function ProblemDetail({visible, issue, issueDetail, onClose}){ { issueDetail.type } { issueDetail.severity } 生效时间 { moment(issue.creationDate).format('YYYY年MM月DD日') } - { issueDetail.lang } + { issueDetail.langName }代码正在分析中,请重试
+分析失败,请重试