Commit 0e5b9e51 authored by 崔佳豪's avatar 崔佳豪

fix: 同步更新login.globalConfig

parent 4fc185fd
Pipeline #47021 skipped with stages
...@@ -13,14 +13,17 @@ import { ...@@ -13,14 +13,17 @@ import {
SERVICE_INTERFACE_SUCCESS_CODE, SERVICE_INTERFACE_SUCCESS_CODE,
WX_REDIRECT_URI, WX_REDIRECT_URI,
} from '@/constants'; } from '@/constants';
import store from '@/stores';
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
const Logger = logger('login'); const Logger = logger('login');
const getGlobalConfig = () => store.getState().toJS().global?.globalConfig ?? {};
class Login { class Login {
constructor(props, callback, isInit) { constructor(props, callback, isInit) {
this.events = window.share.event; this.events = window.share.event;
this.globalConfig = props.global; this.globalConfig = props.global;
this.updateConfig = props.updateConfig; // this.updateConfig = props.updateConfig;
this.updateConfig = (config) => { props.updateConfig(config); this.globalConfig = getGlobalConfig(); console.log('11') }
this.createContext = props.createContext; this.createContext = props.createContext;
this.history = props.history; this.history = props.history;
this.callback = callback; this.callback = callback;
......
...@@ -38,9 +38,9 @@ const Login = forwardRef((props, _ref) => { ...@@ -38,9 +38,9 @@ const Login = forwardRef((props, _ref) => {
() => new LoginAction(Object.assign({}, props, {history}), setVisible, true), () => new LoginAction(Object.assign({}, props, {history}), setVisible, true),
); );
useEffect(() => { // useEffect(() => {
action.globalConfig = props.global; // action.globalConfig = props.global;
}, [props.global]); // }, [props.global]);
const handleSubmit = values => { const handleSubmit = values => {
/* eslint-disable */ /* eslint-disable */
......
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