Commit 253e3e2b authored by 崔佳豪's avatar 崔佳豪

fix: 修复免密登录网站配置丢失问题

parent 90305997
Pipeline #56802 passed with stages
...@@ -13,17 +13,14 @@ const Login = forwardRef((props, _ref) => { ...@@ -13,17 +13,14 @@ const Login = forwardRef((props, _ref) => {
new LoginAction(Object.assign({}, props, { history }), () => {}, false), new LoginAction(Object.assign({}, props, { history }), () => {}, false),
); );
// 需要在 GetGateWay 和 GetConfig 之后再执行登录。避免信息错落 // 需要在 GetGateWay 和 GetConfig 之后再执行登录。避免信息错落
const hasLogin = useRef(); const hasLogin = useRef();
useEffect(() => { useEffect(() => {
action.globalConfig = props.global;
if (props.global && props.global.hasOwnProperty('products') && hasLogin.current !== true) { if (props.global && props.global.hasOwnProperty('products') && hasLogin.current !== true) {
hasLogin.current = true; hasLogin.current = true;
action.init(); action.init();
} }
}, [props.global]);
useEffect(() => {
action.globalConfig = props.global;
}, [action.globalConfig, props.global]); }, [action.globalConfig, props.global]);
useEffect(() => { 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