From f6adae55c0f57c00b66d50e7cd94fdc0f3043078 Mon Sep 17 00:00:00 2001 From: zhaobing Date: Wed, 24 Jan 2024 10:50:41 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E7=99=BB=E5=BD=95=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E9=A9=BE=E9=A9=B6=E8=88=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../client/src/layout/components/header/index.js | 12 ++++++------ web-screen/client/src/layout/reducers/tab.js | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/web-screen/client/src/layout/components/header/index.js b/web-screen/client/src/layout/components/header/index.js index f7c698d..a79f5a3 100644 --- a/web-screen/client/src/layout/components/header/index.js +++ b/web-screen/client/src/layout/components/header/index.js @@ -28,7 +28,7 @@ const Header = props => { const [patrolManageVisible, setPatrolManageVisible] = useState(false) const [deviceManageTabsVisible, setDeviceManageTabsVisible] = useState(false) const [currentSubMenuTab, setCurrentSubMenuTab] = useState('') - const [tab, setTab] = useState('aiot') + const [tab, setTab] = useState('leader') const [projectName, setProjectName ]= useState('') const [weather, setWeather] = useState([]) let headerTitleStyle = { @@ -66,11 +66,11 @@ const Header = props => { }, []) const queryWeather = () => { - // RouteRequest.get(`/query/weather/3d?location=101240101`).then(res => { - // if (res?.daily?.length === 3) { - // setWeather(res.daily) - // } - // }) + RouteRequest.get(`/query/weather/3d?location=101240101`).then(res => { + if (res?.daily?.length === 3) { + setWeather(res.daily) + } + }) } const iconSrc = useMemo(() => { diff --git a/web-screen/client/src/layout/reducers/tab.js b/web-screen/client/src/layout/reducers/tab.js index e03ae1b..811aa98 100644 --- a/web-screen/client/src/layout/reducers/tab.js +++ b/web-screen/client/src/layout/reducers/tab.js @@ -3,7 +3,7 @@ import Immutable from 'immutable'; const initState = { - tab: 'aiot', + tab: 'leader', showCG: true };