diff --git a/code/VideoAccess-VCMP/web/client/src/layout/index.jsx b/code/VideoAccess-VCMP/web/client/src/layout/index.jsx index f3de91c..508282a 100644 --- a/code/VideoAccess-VCMP/web/client/src/layout/index.jsx +++ b/code/VideoAccess-VCMP/web/client/src/layout/index.jsx @@ -171,22 +171,23 @@ const Root = props => { // setAuthCrossLoading(false) // MicroApp - // const microAppListen = async (data) => { - // console.log('xxxx', data); - // if (data.action == 'initMicro') { - // await store.dispatch(push('/noMatch')); - // setMicroAppWaiting(false) - // } - // } - // if (window.__MICRO_APP_ENVIRONMENT__) { - // console.info('MicroApp') - // setAuthCrossLoading(false) - // window.microApp.addDataListener(microAppListen, true) - // } else { - // console.info('NOT MicroApp') - // setMicroAppWaiting(false) - // } - setMicroAppWaiting(false) + const microAppListen = async (data) => { + console.log('xxxx', data); + if (data.action == 'initMicro') { + await store.dispatch(push('/noMatch')); + setMicroAppWaiting(false) + } + } + if (window.__MICRO_APP_ENVIRONMENT__) { + console.info('MicroApp') + setAuthCrossLoading(false) + window.microApp.addDataListener(microAppListen, true) + } else { + console.info('NOT MicroApp') + setMicroAppWaiting(false) + } + // setMicroAppWaiting(false) + }, []) return (