Commit a530d0c8 authored by 邓晓峰's avatar 邓晓峰

修复登录成功之后没有跳转到主页

parent b4636386
Pipeline #34472 skipped with stages
...@@ -25048,9 +25048,9 @@ ...@@ -25048,9 +25048,9 @@
"dev": true "dev": true
}, },
"mini-create-react-context": { "mini-create-react-context": {
"version": "0.3.3", "version": "0.4.1",
"resolved": "https://g.civnet.cn:4873/mini-create-react-context/-/mini-create-react-context-0.3.3.tgz", "resolved": "https://g.civnet.cn:4873/mini-create-react-context/-/mini-create-react-context-0.4.1.tgz",
"integrity": "sha512-TtF6hZE59SGmS4U8529qB+jJFeW6asTLDIpPgvPLSCsooAwJS7QprHIFTqv9/Qh3NdLwQxFYgiHX5lqb6jqzPA==", "integrity": "sha512-YWCYEmd5CQeHGSAKrYvXgmzzkrvssZcuuQDDeqkT+PziKGMgE+0MCCtcKbROzocGBG1meBLl2FotlRwf4gAzbQ==",
"requires": { "requires": {
"@babel/runtime": "^7.12.1", "@babel/runtime": "^7.12.1",
"tiny-warning": "^1.0.3" "tiny-warning": "^1.0.3"
...@@ -30419,15 +30419,15 @@ ...@@ -30419,15 +30419,15 @@
} }
}, },
"react-router": { "react-router": {
"version": "5.1.0", "version": "5.2.1",
"resolved": "https://g.civnet.cn:4873/react-router/-/react-router-5.1.0.tgz", "resolved": "https://g.civnet.cn:4873/react-router/-/react-router-5.2.1.tgz",
"integrity": "sha512-n9HXxaL/6yRlig9XPfGyagI8+bUNdqcu7FUAx0/Z+Us22Z8iHsbkyJ21Inebn9HOxI5Nxlfc8GNabkNSeXfhqw==", "integrity": "sha1-TS5OnVrpQlCRhFuNvG2dJ2I5d00=",
"requires": { "requires": {
"@babel/runtime": "^7.1.2", "@babel/runtime": "^7.12.13",
"history": "^4.9.0", "history": "^4.9.0",
"hoist-non-react-statics": "^3.1.0", "hoist-non-react-statics": "^3.1.0",
"loose-envify": "^1.3.1", "loose-envify": "^1.3.1",
"mini-create-react-context": "^0.3.0", "mini-create-react-context": "^0.4.0",
"path-to-regexp": "^1.7.0", "path-to-regexp": "^1.7.0",
"prop-types": "^15.6.2", "prop-types": "^15.6.2",
"react-is": "^16.6.0", "react-is": "^16.6.0",
...@@ -30435,6 +30435,14 @@ ...@@ -30435,6 +30435,14 @@
"tiny-warning": "^1.0.0" "tiny-warning": "^1.0.0"
}, },
"dependencies": { "dependencies": {
"@babel/runtime": {
"version": "7.15.4",
"resolved": "https://g.civnet.cn:4873/@babel%2fruntime/-/runtime-7.15.4.tgz",
"integrity": "sha1-/RfRa/34eObdAtGXU6OfqKjZyEo=",
"requires": {
"regenerator-runtime": "^0.13.4"
}
},
"path-to-regexp": { "path-to-regexp": {
"version": "1.8.0", "version": "1.8.0",
"resolved": "https://g.civnet.cn:4873/path-to-regexp/-/path-to-regexp-1.8.0.tgz", "resolved": "https://g.civnet.cn:4873/path-to-regexp/-/path-to-regexp-1.8.0.tgz",
...@@ -30454,17 +30462,27 @@ ...@@ -30454,17 +30462,27 @@
} }
}, },
"react-router-dom": { "react-router-dom": {
"version": "5.1.0", "version": "5.3.0",
"resolved": "https://g.civnet.cn:4873/react-router-dom/-/react-router-dom-5.1.0.tgz", "resolved": "https://g.civnet.cn:4873/react-router-dom/-/react-router-dom-5.3.0.tgz",
"integrity": "sha512-OkxKbMKjO7IkYqnoaZNX19MnwgjhxwZE871cPUTq0YU2wpIw7QwGxSnSoNRMOa7wO1TwvJJMFpgiEB4C/gVhTw==", "integrity": "sha1-2hv7U1oOiacSqTuX3Xb0etHzI2M=",
"requires": { "requires": {
"@babel/runtime": "^7.1.2", "@babel/runtime": "^7.12.13",
"history": "^4.9.0", "history": "^4.9.0",
"loose-envify": "^1.3.1", "loose-envify": "^1.3.1",
"prop-types": "^15.6.2", "prop-types": "^15.6.2",
"react-router": "5.1.0", "react-router": "5.2.1",
"tiny-invariant": "^1.0.2", "tiny-invariant": "^1.0.2",
"tiny-warning": "^1.0.0" "tiny-warning": "^1.0.0"
},
"dependencies": {
"@babel/runtime": {
"version": "7.15.4",
"resolved": "https://g.civnet.cn:4873/@babel%2fruntime/-/runtime-7.15.4.tgz",
"integrity": "sha1-/RfRa/34eObdAtGXU6OfqKjZyEo=",
"requires": {
"regenerator-runtime": "^0.13.4"
}
}
} }
}, },
"react-side-effect": { "react-side-effect": {
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
"react-intl": "^3.12.1", "react-intl": "^3.12.1",
"react-redux": "7.0.2", "react-redux": "7.0.2",
"react-router-config": "^5.1.1", "react-router-config": "^5.1.1",
"react-router-dom": "5.1.0", "react-router-dom": "5.3.0",
"react-svg": "^14.0.11", "react-svg": "^14.0.11",
"react-use": "^15.3.4", "react-use": "^15.3.4",
"redux": "4.0.1", "redux": "4.0.1",
......
...@@ -36,7 +36,8 @@ export const API = { ...@@ -36,7 +36,8 @@ export const API = {
GET_SENSOR_TYPE: '/PandaCore/GCK/Sensor/GetSensorType', // 获取传感器类型 GET_SENSOR_TYPE: '/PandaCore/GCK/Sensor/GetSensorType', // 获取传感器类型
GET_SYSTEM_CONFIGURATION: '/PandaCore/OMS/SysConfiguration', // 获取系统配置 GET_SYSTEM_CONFIGURATION: '/PandaCore/OMS/SysConfiguration', // 获取系统配置
GET_INFO_QYWX: '/CityInterface/rest/services/OA.svc/WeChatScanQRCode', GET_INFO_QYWX: '/CityInterface/rest/services/OA.svc/WeChatScanQRCode',
PV_LOGS: '/CityInterface/rest/services/portal.svc/OMMonitor/SavePVLogInfo' PV_LOGS: '/CityInterface/rest/services/portal.svc/OMMonitor/SavePVLogInfo',
LOGIN_LOGS: 'CityInterface/rest/Services/IOTPlatform.svc/WisdomOMS/SaveLoginInfo'
}; };
const services = { const services = {
...@@ -168,6 +169,11 @@ const services = { ...@@ -168,6 +169,11 @@ const services = {
url: API.PV_LOGS, url: API.PV_LOGS,
method: constants.REQUEST_METHOD_POST, method: constants.REQUEST_METHOD_POST,
type: constants.REQUEST_HTTP, type: constants.REQUEST_HTTP,
},
loginLogs: {
url: API.LOGIN_LOGS,
method: constants.REQUEST_METHOD_POST,
type: constants.REQUEST_HTTP,
} }
}; };
......
...@@ -16,7 +16,6 @@ const pkg = require('../../../package.json'); ...@@ -16,7 +16,6 @@ const pkg = require('../../../package.json');
const config = require('../../../config/config'); const config = require('../../../config/config');
const defaultSetting = config.layout; const defaultSetting = config.layout;
function App(props) { function App(props) {
console.log("dyRoutes", dyRoutes(props.menu || []).routes)
return ( return (
<> <>
<Helmet <Helmet
......
...@@ -573,10 +573,10 @@ const BasicLayout = props => { ...@@ -573,10 +573,10 @@ const BasicLayout = props => {
</Tabs> </Tabs>
</div> </div>
<div className="ant-pro-grid-content"> <div className={layoutStyles['ant-pro-grid-content']}>
<div className="ant-pro-grid-content-children"> <div className="ant-pro-grid-content-children">
<div className={layoutStyles['ant-pro-page-container-children-content']}> <div className={layoutStyles['ant-pro-page-container-children-content']}>
<div id="micro-container" className="subapp-container" style={{height: '89vh', marginTop: '70px', position: 'relative'}}/> <div id="micro-container" className="subapp-container" style={{height: '100%'}}/>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -113,6 +113,7 @@ class Login { ...@@ -113,6 +113,7 @@ class Login {
}); });
} }
writeLogs() { writeLogs() {
if (this.globalConfig.userInfo.UserImge === '') { if (this.globalConfig.userInfo.UserImge === '') {
// _config.userInfo.UserImge = __webpack_public_path__ + "assets/images/icon/熊猫新2.png"; // _config.userInfo.UserImge = __webpack_public_path__ + "assets/images/icon/熊猫新2.png";
...@@ -120,11 +121,9 @@ class Login { ...@@ -120,11 +121,9 @@ class Login {
'https://panda-water.cn/web4/assets/images/icon/熊猫新2.png'; 'https://panda-water.cn/web4/assets/images/icon/熊猫新2.png';
} }
// if (this.globalConfig.userInfo.site) { if (this.globalConfig.userInfo.site) {
// // eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
appService
// }
appService
.writeLogs({ .writeLogs({
origin: window.location.origin, origin: window.location.origin,
client: this.globalConfig.client, client: this.globalConfig.client,
...@@ -138,6 +137,25 @@ class Login { ...@@ -138,6 +137,25 @@ class Login {
: '', : '',
}) })
.catch(error => {}); .catch(error => {});
}
if(window.location.host === 'panda-water.com') {
appService
.loginLogs({
origin: window.location.origin,
client: this.globalConfig.client,
site:
this.globalConfig.userInfo && this.globalConfig.userInfo.site
? this.globalConfig.userInfo.site
: '',
loginName:
this.globalConfig.userInfo && this.globalConfig.userInfo.fullName
? this.globalConfig.userInfo.fullName
: '',
})
.catch(error => {});
}
} }
getIndustry(flag, token, getIndustry) { getIndustry(flag, token, getIndustry) {
......
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