Browse Source

登录问题修改

dev
wenlele 2 years ago
parent
commit
05887f1831
  1. 16
      web/client/src/layout/components/header/index.jsx
  2. 1
      web/client/src/sections/problem/components/inspection.jsx

16
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();

1
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) => {

Loading…
Cancel
Save