diff --git a/web/client/src/layout/components/header/index.jsx b/web/client/src/layout/components/header/index.jsx index a9c3f29..8371d1c 100644 --- a/web/client/src/layout/components/header/index.jsx +++ b/web/client/src/layout/components/header/index.jsx @@ -32,12 +32,15 @@ const Header = (props) => { modalRole = headerItems?.filter(v => modal.includes(v.itemKey)) if (userRole?.includes('SuperAdmin') || userRole?.includes('admin')) modalRole = headerItems } + useEffect(() => { - dispatch(install.getProjectPoms({ global: 1 })).then((res) => { //获取已绑定项目 - if (res.success) { - setPomsList(res.payload.data?.rows?.filter(v => v.pepProjectIsDelete == 0)) - } - }) + if (JSON.parse(sessionStorage.getItem('pomsUser'))?.token) { + dispatch(install.getProjectPoms({ global: 1 })).then((res) => { //获取已绑定项目 + if (res.success) { + setPomsList(res.payload.data?.rows?.filter(v => v.pepProjectIsDelete == 0)) + } + }) + } }, []) useEffect(() => { @@ -52,9 +55,6 @@ const Header = (props) => { } }, [Scrollbar]) - - - useEffect(() => { dispatch(pepProject(pepProjectId)) console.log(); diff --git a/web/client/src/sections/problem/components/inspection.jsx b/web/client/src/sections/problem/components/inspection.jsx index d2c8b24..2c2013a 100644 --- a/web/client/src/sections/problem/components/inspection.jsx +++ b/web/client/src/sections/problem/components/inspection.jsx @@ -26,7 +26,6 @@ const Inspection = ({ dispatch, actions, user, route, statistic, pepProjectId }) const api = useRef(); const unfoldApi = useRef(false); -console.log(pepProjectId); useEffect(() => { dispatch(problem.getProjectPoms({ global: 1 })).then((res) => {