|
@ -28,7 +28,7 @@ const Header = props => { |
|
|
const [patrolManageVisible, setPatrolManageVisible] = useState(false) |
|
|
const [patrolManageVisible, setPatrolManageVisible] = useState(false) |
|
|
const [deviceManageTabsVisible, setDeviceManageTabsVisible] = useState(false) |
|
|
const [deviceManageTabsVisible, setDeviceManageTabsVisible] = useState(false) |
|
|
const [currentSubMenuTab, setCurrentSubMenuTab] = useState('') |
|
|
const [currentSubMenuTab, setCurrentSubMenuTab] = useState('') |
|
|
const [tab, setTab] = useState('aiot') |
|
|
const [tab, setTab] = useState('leader') |
|
|
const [projectName, setProjectName ]= useState('') |
|
|
const [projectName, setProjectName ]= useState('') |
|
|
const [weather, setWeather] = useState([]) |
|
|
const [weather, setWeather] = useState([]) |
|
|
let headerTitleStyle = { |
|
|
let headerTitleStyle = { |
|
@ -66,11 +66,11 @@ const Header = props => { |
|
|
}, []) |
|
|
}, []) |
|
|
|
|
|
|
|
|
const queryWeather = () => { |
|
|
const queryWeather = () => { |
|
|
// RouteRequest.get(`/query/weather/3d?location=101240101`).then(res => {
|
|
|
RouteRequest.get(`/query/weather/3d?location=101240101`).then(res => { |
|
|
// if (res?.daily?.length === 3) {
|
|
|
if (res?.daily?.length === 3) { |
|
|
// setWeather(res.daily)
|
|
|
setWeather(res.daily) |
|
|
// }
|
|
|
} |
|
|
// })
|
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const iconSrc = useMemo(() => { |
|
|
const iconSrc = useMemo(() => { |
|
|