Commit d2e84dda authored by 周宏民's avatar 周宏民

pref: 演示功能入口 优化跳转错误时回调

parent 3eb93f8a
Pipeline #85158 waiting for manual action with stages
......@@ -296,6 +296,11 @@ const Demonstration = props => {
setLoading(false);
});
};
const handError = err => {
setJumpLoading(false);
};
useEffect(() => {
const handleToggleIndustry = event => {
props.history && props.history.push(`/?client=${props.global.client}`);
......@@ -307,6 +312,12 @@ const Demonstration = props => {
window.share.event.removeListener('toggleIndustry', handleToggleIndustry);
};
}, [props]);
useEffect(() => {
window.share.event.on('loginError', handError);
return () => {
window.share.event.removeListener('loginError', handError);
};
}, [jumpLoading]);
useEffect(() => {
getData();
window.addEventListener('resize', debounce(onResize, 300));
......
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