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';
import 'file-loader?name=.htaccess!./.htaccess'; // eslint-disable-line import/extensions
import '@wisdom-utils/utils/lib/helpers/format';
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 './utils/event';
......@@ -35,6 +35,9 @@ const setMessageVoice = () => {
};
};
initGlobalConfig();
render({ appContent: '', loading: true });
// 参数用户名密码登录,需要在配置获取完之后进行
if(!params.getParams('loginName') || !params.getParams('password')) {
render({ appContent: '', loading: true });
}
initLocale();
setMessageVoice();
......@@ -5,7 +5,7 @@ import { connect } from 'react-redux';
import { useHistory } from '@wisdom-utils/runtime';
import { actionCreators } from '@/containers/App/store';
import LoginAction from './login';
import { initMicroApps } from '../../../micro';
import { defaultApp } from '../../../micro';
const Login = forwardRef((props, _ref) => {
const history = useHistory();
const [action, setAction] = useState(
......@@ -26,13 +26,16 @@ const Login = forwardRef((props, _ref) => {
// }));
// props.history.push('/' + params.getParams('redirect'))
props.history.push(
`/?client=${props.global.client}&generateType=${
props.global.generateType
}`,
`/?client=${props.global.client}`,
);
// 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]);
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