Commit 501b4f57 authored by 邓晓峰's avatar 邓晓峰

fix: 修复无限嵌套路由

parent 3ab66532
......@@ -110,9 +110,9 @@
"@wisdom-map/Map": "^1.0.12-17",
"@wisdom-map/arcgismap": "^1.0.79-17",
"@wisdom-map/util": "^1.0.27-0",
"@wisdom-utils/components": "0.1.44",
"@wisdom-utils/components": "0.1.50",
"@wisdom-utils/runtime": "0.0.15",
"@wisdom-utils/utils": "0.1.84",
"@wisdom-utils/utils": "0.1.90",
"animate.css": "^4.1.1",
"antd": "^4.17.4",
"compression": "1.7.4",
......
......@@ -252,7 +252,9 @@ const Layout = props => {
useEffect(() => {
window.share.event.on('updateSite', res => setCityData(res));
window.share.event.on('updateSite', res => {
setCityData(res)
});
return () => {
window.share.event.removeAllListeners('updateSite');
};
......
......@@ -30,8 +30,8 @@ class SecurityLayout extends React.Component {
const nextPathname = nextProps.location.pathname;
const nextArgv = nextPathname.split('/');
if(argv[1] !== nextArgv[1]) {
console.log(argv[2], nextArgv[2])
if(argv[2] !== nextArgv[2]) {
Object.keys(products).forEach(item => {
window[products[item]] && window[products[item]] && window[products[item]].unmount && window[products[item]].unmount({store: store});
});
......
......@@ -361,13 +361,14 @@ class Site {
self.props.history && self.props.history.push(url)
self.getCityStationsForUser().then(res => {
debugger
window.share.event.emit('updateSite', res);
});
self.props &&
self.props.updateCollapsed &&
self.props.updateCollapsed(false);
window.share.event.emit('triggerMicro', this.props.global);
onChangeVisible && onChangeVisible(false);
// onChangeVisible && onChangeVisible(false);
});
login.init();
}
......
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