Commit 74564964 authored by 崔佳豪's avatar 崔佳豪

fix: 切换站点未变更

parent d462f7f1
Pipeline #48625 skipped with stages
...@@ -189,6 +189,7 @@ const Layout = props => { ...@@ -189,6 +189,7 @@ const Layout = props => {
// const basename = getBaseName(); // const basename = getBaseName();
const history = useHistory(); const history = useHistory();
useEffect(() => { useEffect(() => {
siteAction.setGlobalConfig(props.global);
const tk = Cookies.get('token') || props.global.token; const tk = Cookies.get('token') || props.global.token;
const isLogin = tk !== null && tk !== 'undefined' && tk !== (void 0); const isLogin = tk !== null && tk !== 'undefined' && tk !== (void 0);
if (!isLogin) { if (!isLogin) {
...@@ -231,7 +232,6 @@ const Layout = props => { ...@@ -231,7 +232,6 @@ 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