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

fix: 免密登录加载异常

parent 814342a5
Pipeline #50563 passed with stages
in 2 minutes 27 seconds
...@@ -7,7 +7,7 @@ import 'animate.css/animate.css'; ...@@ -7,7 +7,7 @@ import 'animate.css/animate.css';
import 'file-loader?name=.htaccess!./.htaccess'; // eslint-disable-line import/extensions import 'file-loader?name=.htaccess!./.htaccess'; // eslint-disable-line import/extensions
import '@wisdom-utils/utils/lib/helpers/format'; import '@wisdom-utils/utils/lib/helpers/format';
import 'sanitize.css/sanitize.css'; import 'sanitize.css/sanitize.css';
import { Storeage } from '@wisdom-utils/utils/lib/helpers'; import { Storeage, params } from '@wisdom-utils/utils/lib/helpers';
import { initGlobalConfig } from './initConfig'; import { initGlobalConfig } from './initConfig';
import './utils/event'; import './utils/event';
...@@ -35,6 +35,9 @@ const setMessageVoice = () => { ...@@ -35,6 +35,9 @@ const setMessageVoice = () => {
}; };
}; };
initGlobalConfig(); initGlobalConfig();
render({ appContent: '', loading: true }); // 参数用户名密码登录,需要在配置获取完之后进行
if(!params.getParams('loginName') || !params.getParams('password')) {
render({ appContent: '', loading: true });
}
initLocale(); initLocale();
setMessageVoice(); setMessageVoice();
...@@ -5,7 +5,7 @@ import { connect } from 'react-redux'; ...@@ -5,7 +5,7 @@ import { connect } from 'react-redux';
import { useHistory } from '@wisdom-utils/runtime'; import { useHistory } from '@wisdom-utils/runtime';
import { actionCreators } from '@/containers/App/store'; import { actionCreators } from '@/containers/App/store';
import LoginAction from './login'; import LoginAction from './login';
import { initMicroApps } from '../../../micro'; import { defaultApp } from '../../../micro';
const Login = forwardRef((props, _ref) => { const Login = forwardRef((props, _ref) => {
const history = useHistory(); const history = useHistory();
const [action, setAction] = useState( const [action, setAction] = useState(
...@@ -26,13 +26,16 @@ const Login = forwardRef((props, _ref) => { ...@@ -26,13 +26,16 @@ const Login = forwardRef((props, _ref) => {
// })); // }));
// props.history.push('/' + params.getParams('redirect')) // props.history.push('/' + params.getParams('redirect'))
props.history.push( props.history.push(
`/?client=${props.global.client}&generateType=${ `/?client=${props.global.client}`,
props.global.generateType
}`,
); );
// window.share.event.emit('triggerMicro', props.global); // window.share.event.emit('triggerMicro', props.global);
initMicroApps(); // initMicroApps();
debugger
defaultApp();
}); });
return () => {
action && action.events && action.events.removeAllListeners('loginSuccess');
}
}, [action, props.global.client, props.global.generateType, props.history]); }, [action, props.global.client, props.global.generateType, props.history]);
return <div>{props.children}</div>; return <div>{props.children}</div>;
......
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