mirror of
https://github.com/didi/KnowStreaming.git
synced 2026-01-05 04:50:55 +08:00
合并3.3.0企业版改动
This commit is contained in:
@@ -31,12 +31,7 @@ export const { Provider, Consumer } = React.createContext('zh');
|
||||
|
||||
const defaultLanguage = 'zh';
|
||||
|
||||
const AppContent = (props: {
|
||||
getLicenseInfo?: (cbk: (msg: string) => void) => void | undefined;
|
||||
licenseEventBus?: Record<string, any> | undefined;
|
||||
}) => {
|
||||
const { getLicenseInfo, licenseEventBus } = props;
|
||||
|
||||
const AppContent = (props: any) => {
|
||||
return (
|
||||
<div className="config-system">
|
||||
<DProLayout.Sider prefixCls={'dcd-two-columns'} width={200} theme={'light'} systemKey={systemKey} menuConf={leftMenus} />
|
||||
@@ -44,7 +39,7 @@ const AppContent = (props: {
|
||||
<RouteGuard
|
||||
routeList={pageRoutes}
|
||||
beforeEach={() => {
|
||||
getLicenseInfo?.((msg) => licenseEventBus?.emit('licenseError', msg));
|
||||
// getLicenseInfo?.((msg) => licenseEventBus?.emit('licenseError', msg));
|
||||
return Promise.resolve(true);
|
||||
}}
|
||||
noMatch={() => <Redirect to="/404" />}
|
||||
@@ -55,7 +50,6 @@ const AppContent = (props: {
|
||||
};
|
||||
|
||||
const App = (props: any) => {
|
||||
const { getLicenseInfo, licenseEventBus } = props;
|
||||
const intlMessages = _.get(localeMap[defaultLanguage], 'intlMessages', intlZhCN);
|
||||
const locale = _.get(localeMap[defaultLanguage], 'intl', 'zh-CN');
|
||||
const antdLocale = _.get(localeMap[defaultLanguage], 'dantd', dantdZhCN);
|
||||
@@ -65,7 +59,7 @@ const App = (props: any) => {
|
||||
<AppContainer intlProvider={{ locale, messages: intlMessages }} antdProvider={{ locale: antdLocale }}>
|
||||
<Router basename={systemKey}>
|
||||
<Switch>
|
||||
<AppContent getLicenseInfo={getLicenseInfo} licenseEventBus={licenseEventBus} />
|
||||
<AppContent />
|
||||
</Switch>
|
||||
</Router>
|
||||
</AppContainer>
|
||||
|
||||
Reference in New Issue
Block a user