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)) modalRole = headerItems?.filter(v => modal.includes(v.itemKey))
if (userRole?.includes('SuperAdmin') || userRole?.includes('admin')) modalRole = headerItems if (userRole?.includes('SuperAdmin') || userRole?.includes('admin')) modalRole = headerItems
} }
useEffect(() => { useEffect(() => {
dispatch(install.getProjectPoms({ global: 1 })).then((res) => { // if (JSON.parse(sessionStorage.getItem('pomsUser'))?.token) {
if (res.success) { dispatch(install.getProjectPoms({ global: 1 })).then((res) => { //
setPomsList(res.payload.data?.rows?.filter(v => v.pepProjectIsDelete == 0)) if (res.success) {
} setPomsList(res.payload.data?.rows?.filter(v => v.pepProjectIsDelete == 0))
}) }
})
}
}, []) }, [])
useEffect(() => { useEffect(() => {
@ -52,9 +55,6 @@ const Header = (props) => {
} }
}, [Scrollbar]) }, [Scrollbar])
useEffect(() => { useEffect(() => {
dispatch(pepProject(pepProjectId)) dispatch(pepProject(pepProjectId))
console.log(); 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 api = useRef();
const unfoldApi = useRef(false); const unfoldApi = useRef(false);
console.log(pepProjectId);
useEffect(() => { useEffect(() => {
dispatch(problem.getProjectPoms({ global: 1 })).then((res) => { dispatch(problem.getProjectPoms({ global: 1 })).then((res) => {

Loading…
Cancel
Save