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

fix: 同步更新login.globalConfig

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