Commit 773150f6 authored by 周宏民's avatar 周宏民

fix: 演示功能 在一些报错情况下,停止loading,跳转成功前进度条100%

parent aebc19d3
Pipeline #89095 waiting for manual action with stages
This diff is collapsed.
......@@ -17,12 +17,12 @@ import { encode } from 'js-base64';
import { appService } from '@/api';
import { actionCreators } from '@/containers/App/store';
import { connect } from 'react-redux';
import LoginAction from '@/pages/user/login/login';
import classNames from 'classnames';
import { defaultApp } from '@/micro';
import Iframe from '@/components/Container/Iframe';
import moment from 'moment';
import LoadPage from '@/components/LoadPage';
import LoginAction from './components/login';
import useFullScreen from './components/useFullScreen';
import styles from './index.less';
import LeftItem from './components/Left';
......@@ -378,8 +378,13 @@ const Demonstration = props => {
setLoading(false);
});
};
const onendLoading = () => {
jumpProgressEnd();
};
const handError = err => {
if (err) {
message.error(err);
}
setJumpLoading(false);
jumpProgressEnd();
};
......@@ -418,8 +423,11 @@ const Demonstration = props => {
}, [props]);
useEffect(() => {
window.share.event.on('loginError', handError);
// 结束跳转loading
window.share.event.on('onendLoading', onendLoading);
return () => {
window.share.event.removeListener('loginError', handError);
window.share.event.removeListener('onendLoading', onendLoading);
};
}, [jumpLoading]);
useEffect(() => {
......
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