ww664853070 2 years ago
parent
commit
702d562a54
  1. 10
      api/config.js
  2. 12
      web/client/src/layout/components/header/index.jsx
  3. 7
      web/client/src/sections/auth/containers/login.jsx
  4. 11
      web/config.js

10
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 ( if (
!RC_DB !RC_DB

12
web/client/src/layout/components/header/index.jsx

@ -84,20 +84,12 @@ const Header = (props) => {
) )
} }
})} })}
{/* <div style={{ display: 'flex', alignItems: 'center' }}> <div style={{ display: 'flex', alignItems: 'center' }}>
<div style={{ marginLeft: 16, width: 24, height: 24 }}> <div style={{ marginLeft: 16, width: 24, height: 24 }}>
<img src="/assets/images/background/username.png" alt="" style={{ width: '100%', height: '100%' }} /> <img src="/assets/images/background/username.png" alt="" style={{ width: '100%', height: '100%' }} />
</div> </div>
<div style={{ color: '#92CBFF', fontSize: 12, marginLeft: 10, cursor: "pointer" }} onClick={() => { <div style={{ color: '#92CBFF', fontSize: 12, marginLeft: 10, cursor: "pointer" }}>{user?.name}</div>
dispatch(actions.auth.logout(user));
if (socket) {
socket.disconnect();
}
history.push(`/signin`);
}}>
退出
</div> </div>
</div> */}
{/* <Nav.Sub {/* <Nav.Sub
itemKey={"user"} itemKey={"user"}

7
web/client/src/sections/auth/containers/login.jsx

@ -8,7 +8,7 @@ import { IconLock, IconUser } from '@douyinfe/semi-icons';
import '../style.less' import '../style.less'
const Login = props => { const Login = props => {
const { dispatch, user, error, actions, apiRoot, isRequesting } = props const { dispatch, user, error, actions, apiRoot, isRequesting,webPepUrl } = props
const form = useRef(); const form = useRef();
useEffect(() => { useEffect(() => {
@ -23,6 +23,8 @@ const Login = props => {
dispatch(push('/businessManagement/pmReport/reserveItemsReporting')); dispatch(push('/businessManagement/pmReport/reserveItemsReporting'));
localStorage.setItem('poms_open_sider', JSON.stringify(["pmReport"])) localStorage.setItem('poms_open_sider', JSON.stringify(["pmReport"]))
localStorage.setItem('poms_selected_sider', JSON.stringify(["businessManagement"])) localStorage.setItem('poms_selected_sider', JSON.stringify(["businessManagement"]))
}else{
window.location.href = `${webPepUrl}/signin`
} }
}, [user]) }, [user])
@ -110,7 +112,8 @@ function mapStateToProps(state) {
error: auth.error, error: auth.error,
actions: global.actions, actions: global.actions,
apiRoot: global.apiRoot, apiRoot: global.apiRoot,
isRequesting: auth.isRequesting isRequesting: auth.isRequesting,
webPepUrl: global.webPepUrl,
} }
} }

11
web/config.js

@ -28,7 +28,7 @@ const flags = args.parse(process.argv);
const API_URL = process.env.API_URL || flags.apiUrl; const API_URL = process.env.API_URL || flags.apiUrl;
const API_DC_URL = process.env.API_DC_URL || flags.apiHrUrl; 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.env.FS_PEP_DOMAIN || flags.domain;
const WEB_PEP_URL = process.env.WEB_PEP_URL || flags.webPepUrl; const WEB_PEP_URL = process.env.WEB_PEP_URL || flags.webPepUrl;
// 七牛 // 七牛
@ -40,15 +40,6 @@ const ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE = process.env.ANXINCLOUD_QINIU_DOMA
const ANXINCLOUD_PM_SERVICES = process.env.ANXINCLOUD_PM_SERVICES || flags.pmrs; 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 ( if (
!API_URL !API_URL
|| !API_DC_URL || !API_DC_URL

Loading…
Cancel
Save