From 859c8517e1f4828a705b815766afb6e404a7f372 Mon Sep 17 00:00:00 2001 From: wenlele Date: Tue, 6 Dec 2022 17:12:24 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/config.js | 10 ---------- web/config.js | 10 +--------- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/api/config.js b/api/config.js index 8de4707..de1647c 100644 --- a/api/config.js +++ b/api/config.js @@ -57,16 +57,6 @@ const CLICKHOUST_HR = process.env.CLICKHOUST_HR || flags.clickHouseHr -console.log('RC_DB',RC_DB); -console.log('IOTA_REDIS_SERVER_HOST',IOTA_REDIS_SERVER_HOST); -console.log('IOTA_REDIS_SERVER_PORT',IOTA_REDIS_SERVER_PORT); -console.log('API_EMIS_URL',API_EMIS_URL); -console.log('QINIU_DOMAIN_QNDMN_RESOURCE',QINIU_DOMAIN_QNDMN_RESOURCE); -console.log('QINIU_BUCKET_RESOURCE',QINIU_BUCKET_RESOURCE); -console.log('QINIU_AK',QINIU_AK); -console.log('QINIU_SK',QINIU_SK); -console.log('CLICKHOUST_PEP_EMIS',CLICKHOUST_PEP_EMIS); -console.log('CLICKHOUST_HR',CLICKHOUST_HR); if ( !RC_DB diff --git a/web/config.js b/web/config.js index 09b5140..3abad0f 100644 --- a/web/config.js +++ b/web/config.js @@ -28,7 +28,7 @@ const flags = args.parse(process.argv); const API_URL = process.env.API_URL || flags.apiUrl; const API_DC_URL = process.env.API_DC_URL || flags.apiHrUrl; -const FS_PEP_DOMAIN = process.FS_REPORT_DOMAIN || flags.domain; +const FS_PEP_DOMAIN = process.FS_PEP_DOMAIN || flags.domain; const WEB_PEP_URL = process.env.WEB_PEP_URL || flags.webPepUrl; // 七牛 @@ -40,14 +40,6 @@ const ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE = process.env.ANXINCLOUD_QINIU_DOMA const ANXINCLOUD_PM_SERVICES = process.env.ANXINCLOUD_PM_SERVICES || flags.pmrs; -console.log('API_URL',API_URL); -console.log('API_DC_URL',API_DC_URL); -console.log('WEB_PEP_URL',WEB_PEP_URL); -console.log('FS_PEP_DOMAIN',FS_PEP_DOMAIN); -console.log('ANXINCLOUD_QINIU_AK',ANXINCLOUD_QINIU_AK); -console.log('ANXINCLOUD_QINIU_SK',ANXINCLOUD_QINIU_SK); -console.log('ANXINCLOUD_QINIU_BUCKET_RESOURCE',ANXINCLOUD_QINIU_BUCKET_RESOURCE); -console.log('ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE',ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE); if ( !API_URL From 34c9268c47a69a6d74d8ff0bef1103cecd7c0af7 Mon Sep 17 00:00:00 2001 From: wenlele Date: Tue, 6 Dec 2022 17:37:26 +0800 Subject: [PATCH 2/4] log --- web/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/config.js b/web/config.js index 3abad0f..1b18098 100644 --- a/web/config.js +++ b/web/config.js @@ -39,7 +39,7 @@ const ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE = process.env.ANXINCLOUD_QINIU_DOMA //后端服务 const ANXINCLOUD_PM_SERVICES = process.env.ANXINCLOUD_PM_SERVICES || flags.pmrs; - +console.log(API_URL,API_DC_URL,WEB_PEP_URL,FS_PEP_DOMAIN,ANXINCLOUD_QINIU_AK ,ANXINCLOUD_QINIU_SK ,ANXINCLOUD_QINIU_BUCKET_RESOURCE ,ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE); if ( !API_URL From 6af7df8278cd67472008190dffdb63abb67989f6 Mon Sep 17 00:00:00 2001 From: wenlele Date: Tue, 6 Dec 2022 17:53:40 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=90=AF=E5=8A=A8=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/config.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/web/config.js b/web/config.js index 1b18098..242d22e 100644 --- a/web/config.js +++ b/web/config.js @@ -28,7 +28,7 @@ const flags = args.parse(process.argv); const API_URL = process.env.API_URL || flags.apiUrl; const API_DC_URL = process.env.API_DC_URL || flags.apiHrUrl; -const FS_PEP_DOMAIN = process.FS_PEP_DOMAIN || flags.domain; +const FS_PEP_DOMAIN = process.env.FS_PEP_DOMAIN || flags.domain; const WEB_PEP_URL = process.env.WEB_PEP_URL || flags.webPepUrl; // 七牛 @@ -39,7 +39,6 @@ const ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE = process.env.ANXINCLOUD_QINIU_DOMA //后端服务 const ANXINCLOUD_PM_SERVICES = process.env.ANXINCLOUD_PM_SERVICES || flags.pmrs; -console.log(API_URL,API_DC_URL,WEB_PEP_URL,FS_PEP_DOMAIN,ANXINCLOUD_QINIU_AK ,ANXINCLOUD_QINIU_SK ,ANXINCLOUD_QINIU_BUCKET_RESOURCE ,ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE); if ( !API_URL From c20d4ac18ba2995b2adbb266685d2d50e3576e64 Mon Sep 17 00:00:00 2001 From: wenlele Date: Wed, 7 Dec 2022 10:02:40 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E8=B7=AF=E7=94=B1=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E5=90=8D=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/layout/components/header/index.jsx | 196 +++++++++--------- .../src/sections/auth/containers/login.jsx | 7 +- 2 files changed, 99 insertions(+), 104 deletions(-) diff --git a/web/client/src/layout/components/header/index.jsx b/web/client/src/layout/components/header/index.jsx index afc0e67..1941b7d 100644 --- a/web/client/src/layout/components/header/index.jsx +++ b/web/client/src/layout/components/header/index.jsx @@ -7,99 +7,91 @@ import { headerItems } from './contant'; import "./index.less"; const Header = (props) => { - const { dispatch, history, user, actions, socket, tochange } = props; + const { dispatch, history, user, actions, socket, tochange } = props; - return ( - <> -
-
- - ); + + } + /> + + + ); }; -function mapStateToProps(state) { - const { global, auth, webSocket } = state; - return { - actions: global.actions, - user: auth.user, - socket: webSocket.socket, - }; +function mapStateToProps (state) { + const { global, auth, webSocket } = state; + return { + actions: global.actions, + user: auth.user, + socket: webSocket.socket, + }; } export default connect(mapStateToProps)(Header); diff --git a/web/client/src/sections/auth/containers/login.jsx b/web/client/src/sections/auth/containers/login.jsx index 4daa853..6d962a6 100644 --- a/web/client/src/sections/auth/containers/login.jsx +++ b/web/client/src/sections/auth/containers/login.jsx @@ -8,7 +8,7 @@ import { IconLock, IconUser } from '@douyinfe/semi-icons'; import '../style.less' const Login = props => { - const { dispatch, user, error, actions, apiRoot, isRequesting } = props + const { dispatch, user, error, actions, apiRoot, isRequesting,webPepUrl } = props const form = useRef(); useEffect(() => { @@ -23,6 +23,8 @@ const Login = props => { dispatch(push('/businessManagement/pmReport/reserveItemsReporting')); localStorage.setItem('poms_open_sider', JSON.stringify(["pmReport"])) localStorage.setItem('poms_selected_sider', JSON.stringify(["businessManagement"])) + }else{ + window.location.href = `${webPepUrl}/signin` } }, [user]) @@ -110,7 +112,8 @@ function mapStateToProps(state) { error: auth.error, actions: global.actions, apiRoot: global.apiRoot, - isRequesting: auth.isRequesting + isRequesting: auth.isRequesting, + webPepUrl: global.webPepUrl, } }