Commit 642f7e24 authored by 徐乐's avatar 徐乐

feat: 修改

parent d162e8ab
Pipeline #79664 waiting for manual action with stages
......@@ -274,6 +274,7 @@ const Layout = props => {
const { routeConfig = {}, matchPath } = pickRoutes(props.flatMenu, location.pathname);
const context = useContext(ConfigProvider.ConfigContext);
const prefixCls = props.prefixCls ?? context.getPrefixCls();
const [first, setFirst] = useState(true);
// useEffect(() => {
// setRouteConfig(routeConfig);
......@@ -359,20 +360,24 @@ const Layout = props => {
}, [cityData, cityLoading, props.global, props.global.userInfo, siteAction]);
const GetIntegrationConfig = () => {
appService
.GetIntegrationConfig({
type: '集成登录',
userId: window.globalConfig.userInfo?.OID ?? null,
isEnable: true,
})
.then(res => {
const { code, data } = res;
if (code == '0') {
setIntegrationData(data);
} else {
setIntegrationData([]);
}
})
if (first) {
appService
.GetIntegrationConfig({
type: '集成登录',
userId: window.globalConfig.userInfo?.OID ?? null,
isEnable: true,
})
.then(res => {
setFirst(false);
const { code, data } = res;
if (code == '0') {
setIntegrationData(data);
} else {
setIntegrationData([]);
}
})
}
}
useEffect(() => {
......@@ -386,7 +391,7 @@ const Layout = props => {
const handleToggleIndustry = event => {
setVisible(false);
setIntegrationLoading(false);
props.history.push(`/?client=${window.globalConfig.homepage.client}`);
props.history.push(`/?client=${window.globalConfig.client}`);
props.updateCurrentIndex(0);
defaultApp();
};
......
......@@ -221,7 +221,7 @@ class Login {
? this.globalConfig.userInfo.fullName
: '',
})
.catch(error => {});
.catch(error => { });
}
if (window.location.host === 'panda-water.com') {
......@@ -235,7 +235,7 @@ class Login {
? this.globalConfig.userInfo.fullName
: '',
})
.catch(error => {});
.catch(error => { });
}
}
......@@ -372,9 +372,8 @@ class Login {
mqttConfig.mqtt_mess.TcpPort = DEFAULT_TCP_PORT;
mqttConfig.mqtt_IsSSL = `${mqttConfig.mqtt_mess.TcpIP}:${mqttConfig.mqtt_mess.TcpPort}`;
}
mqttConfig.mqtt_iotIP = `${mqttConfig.mqtt_mess.TcpIP}:${
mqttConfig.mqtt_mess.TcpPort ? mqttConfig.mqtt_mess.TcpPort : '443'
}`;
mqttConfig.mqtt_iotIP = `${mqttConfig.mqtt_mess.TcpIP}:${mqttConfig.mqtt_mess.TcpPort ? mqttConfig.mqtt_mess.TcpPort : '443'
}`;
self.globalConfig = Object.assign(self.globalConfig, {
...mqttConfig,
});
......@@ -418,6 +417,12 @@ class Login {
});
if (this.globalConfig?.isIntegration >= 1) {
self.globalConfig = Object.assign(self.globalConfig, config, {
widgets: config.widgets || [],
allWidgets: config.widgets || [],
uiwidgets: config.uiwidgets || [],
});
self.updateConfig && self.updateConfig(self.globalConfig);
}
......@@ -736,7 +741,7 @@ class Login {
height: '400',
});
const handleMessage = function(event) {
const handleMessage = function (event) {
const { origin } = event;
// Logger.log('origin', event.origin);
if (origin === 'https://login.dingtalk.com') {
......
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