Commit 5b2c49f6 authored by 徐乐's avatar 徐乐

feat: 修改集成登录单站点问题

parent d028e0ad
Pipeline #81114 passed with stages
/* eslint-disable */ /* eslint-disable */
// const proxyURL = process.env.NODE_ENV !== 'production' ? 'http://192.168.10.150:8777' : window.location.origin; // const proxyURL = process.env.NODE_ENV !== 'production' ? 'http://192.168.10.150:8777' : window.location.origin;
// const proxyURL = 'https://work.panda-water.cn'; // const proxyURL = 'https://work.panda-water.cn';
const proxyURL = 'http://120.194.86.66:8096/'; const proxyURL = 'http://localhost:8085/';
// const proxyURL = 'https://panda-water.cn' // const proxyURL = 'https://panda-water.cn'
//const proxyURL = 'http://192.168.12.189:8816/' //const proxyURL = 'http://192.168.12.189:8816/'
module.exports = { module.exports = {
......
...@@ -33,6 +33,7 @@ class Login { ...@@ -33,6 +33,7 @@ class Login {
this.createContext = props.createContext; this.createContext = props.createContext;
this.history = props.history; this.history = props.history;
this.callback = callback; this.callback = callback;
this.integratedNum = 0;
this.hasTry = false; this.hasTry = false;
this.logout = props.logout; this.logout = props.logout;
if (isInit) { if (isInit) {
...@@ -222,7 +223,7 @@ class Login { ...@@ -222,7 +223,7 @@ class Login {
? this.globalConfig.userInfo.fullName ? this.globalConfig.userInfo.fullName
: '', : '',
}) })
.catch(error => {}); .catch(error => { });
} }
if (window.location.host === 'panda-water.com') { if (window.location.host === 'panda-water.com') {
...@@ -236,7 +237,7 @@ class Login { ...@@ -236,7 +237,7 @@ class Login {
? this.globalConfig.userInfo.fullName ? this.globalConfig.userInfo.fullName
: '', : '',
}) })
.catch(error => {}); .catch(error => { });
} }
} }
...@@ -257,7 +258,7 @@ class Login { ...@@ -257,7 +258,7 @@ class Login {
return false; return false;
} }
// 跳转到集成登录引导页_xule_2023-08-28 // 跳转到集成登录引导页_xule_2023-08-28
if (!flag && this.isSignIn && this.globalConfig.isIntegration >= 1) { if (!flag && this.isSignIn && this.globalConfig.isIntegration >= 1 && this.integratedNum >= 2) {
this.history.push('/industry'); this.history.push('/industry');
return false; return false;
} }
...@@ -373,9 +374,8 @@ class Login { ...@@ -373,9 +374,8 @@ class Login {
mqttConfig.mqtt_mess.TcpPort = DEFAULT_TCP_PORT; mqttConfig.mqtt_mess.TcpPort = DEFAULT_TCP_PORT;
mqttConfig.mqtt_IsSSL = `${mqttConfig.mqtt_mess.TcpIP}:${mqttConfig.mqtt_mess.TcpPort}`; mqttConfig.mqtt_IsSSL = `${mqttConfig.mqtt_mess.TcpIP}:${mqttConfig.mqtt_mess.TcpPort}`;
} }
mqttConfig.mqtt_iotIP = `${mqttConfig.mqtt_mess.TcpIP}:${ mqttConfig.mqtt_iotIP = `${mqttConfig.mqtt_mess.TcpIP}:${mqttConfig.mqtt_mess.TcpPort ? mqttConfig.mqtt_mess.TcpPort : '443'
mqttConfig.mqtt_mess.TcpPort ? mqttConfig.mqtt_mess.TcpPort : '443' }`;
}`;
self.globalConfig = Object.assign(self.globalConfig, { self.globalConfig = Object.assign(self.globalConfig, {
...mqttConfig, ...mqttConfig,
}); });
...@@ -752,7 +752,7 @@ class Login { ...@@ -752,7 +752,7 @@ class Login {
height: '400', height: '400',
}); });
const handleMessage = function(event) { const handleMessage = function (event) {
const { origin } = event; const { origin } = event;
// Logger.log('origin', event.origin); // Logger.log('origin', event.origin);
if (origin === 'https://login.dingtalk.com') { if (origin === 'https://login.dingtalk.com') {
...@@ -869,7 +869,6 @@ class Login { ...@@ -869,7 +869,6 @@ class Login {
const tk = response.token; const tk = response.token;
self.globalConfig.token = tk; self.globalConfig.token = tk;
// eslint-disable-next-line no-undef,no-debugger // eslint-disable-next-line no-undef,no-debugger
getUserInfo( getUserInfo(
{ {
token: tk, token: tk,
...@@ -999,7 +998,7 @@ class Login { ...@@ -999,7 +998,7 @@ class Login {
try { try {
if (response && response.code === 0) { if (response && response.code === 0) {
self.globalConfig.userInfo = window?.globalConfig?.transformUserInfo?.(response.data) ?? {}; self.globalConfig.userInfo = window?.globalConfig?.transformUserInfo?.(response.data) ?? {};
self.integratedNum = response.data?.integrated;
const date = new Date(); const date = new Date();
date.setTime(date.getTime() + 24 * 60 * 60 * 1000); date.setTime(date.getTime() + 24 * 60 * 60 * 1000);
// date = date.toGMTString(); // date = date.toGMTString();
......
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