|
|
@ -29,6 +29,7 @@ const Header = props => { |
|
|
|
const [deviceManageTabsVisible, setDeviceManageTabsVisible] = useState(false) |
|
|
|
const [currentSubMenuTab, setCurrentSubMenuTab] = useState('') |
|
|
|
const [tab, setTab] = useState('leader') |
|
|
|
const [projectName, setProjectName ]= useState('') |
|
|
|
const [weather, setWeather] = useState([]) |
|
|
|
let headerTitleStyle = { |
|
|
|
position: 'absolute', |
|
|
@ -39,6 +40,7 @@ const Header = props => { |
|
|
|
fontWeight: 600, |
|
|
|
fontFamily: 'PangMenZhengDao', |
|
|
|
letterSpacing: '.5231rem', |
|
|
|
width:'39rem' |
|
|
|
} |
|
|
|
let headerTabStyle = { |
|
|
|
width: '4.375rem', |
|
|
@ -52,12 +54,15 @@ const Header = props => { |
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
queryWeather() |
|
|
|
const projectName = JSON.parse(sessionStorage.getItem('user')).projectName |
|
|
|
setProjectName(projectName) |
|
|
|
const timeUpdate = setInterval(() => { |
|
|
|
queryWeather() |
|
|
|
}, WEATHERMARGIN) |
|
|
|
return () => { |
|
|
|
clearInterval(timeUpdate) |
|
|
|
} |
|
|
|
|
|
|
|
}, []) |
|
|
|
|
|
|
|
const queryWeather = () => { |
|
|
@ -105,7 +110,7 @@ const Header = props => { |
|
|
|
<div className={styles['header-fold']}> |
|
|
|
{/* <img src='/assets/images/logo.svg' style={{ margin: '-14px 12px 0 0', height: 24 }} /> */} |
|
|
|
<div className={styles['header-title']} style={{}}> |
|
|
|
<span style={headerTitleStyle}>河州路河州路河州路河州路河州路</span> |
|
|
|
<span style={headerTitleStyle}>{projectName}</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div |
|
|
|