Commit defcbfd7 authored by 邓晓峰's avatar 邓晓峰

feat: 优化站点选择器

parent 1fbd3c18
Pipeline #47982 skipped with stages
...@@ -223,6 +223,10 @@ const Layout = props => { ...@@ -223,6 +223,10 @@ const Layout = props => {
props.logout(); props.logout();
return; return;
} }
}, [props.global]);
useEffect(() => {
if ( if (
props.global && props.global &&
props.global.userInfo && props.global.userInfo &&
...@@ -234,7 +238,7 @@ const Layout = props => { ...@@ -234,7 +238,7 @@ const Layout = props => {
setCityData(res); setCityData(res);
}); });
} }
}, [props.global]); }, [props.global.userInfo])
const handlerPageChange = () => { const handlerPageChange = () => {
...@@ -252,7 +256,9 @@ const Layout = props => { ...@@ -252,7 +256,9 @@ const Layout = props => {
useEffect(() => { useEffect(() => {
window.share.event.on('updateSite', res => { window.share.event.on('updateSite', res => {
debugger
setCityData(res) setCityData(res)
}); });
return () => { return () => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment