Compare commits

...

2 Commits

  1. 10
      web/client/src/sections/quanju/containers/footer/leadership/left/left-top.js

10
web/client/src/sections/quanju/containers/footer/leadership/left/left-top.js

@ -11,6 +11,7 @@ const Lefttop = (props) => {
const [mass, setMass] = useState()
const [speed, setspeed] = useState()
const [traffic, setTraffic] = useState()
const [tim, setTim] = useState()
const [nums, setNums] = useState()
useEffect(() => {
const shuju = dispatch(getGodshuju()).then((res) => {
@ -32,9 +33,14 @@ const Lefttop = (props) => {
setNums(localStorage.getItem("num"))
}
})
}, [tim])
useEffect(() => {
const timer = setInterval(() => {
setTim(new Date())
}, 300000);
return () => clearInterval(timer);
}, [])
// console.log(mass);
// console.log(nums);
// console.log(tim);
return (
<>
<Module style={style} title={"道路拥堵指数"} >

Loading…
Cancel
Save