Commit 92130053 authored by tangwei's avatar tangwei

解决打包内存溢出

parent 4c999556
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
"amos-pluggable": "^1.0.6", "amos-pluggable": "^1.0.6",
"amos-processor": "^1.2.17", "amos-processor": "^1.2.17",
"amos-rules-config": "^1.0.4", "amos-rules-config": "^1.0.4",
"amos-security": "^2.0.19",
"amos-tool": "^1.x", "amos-tool": "^1.x",
"amos-viz": "^1.x", "amos-viz": "^1.x",
"amos-websocket": "^1.0.3", "amos-websocket": "^1.0.3",
......
import React, { Component } from 'react'; // import React, { Component } from 'react';
import { browserHistory } from 'amos-react-router'; // import { browserHistory } from 'amos-react-router';
import Login from 'amos-security/lib/view/login/LoginWithSignup'; // import Login from 'amos-security/lib/view/login/LoginWithSignup';
import { Store, DES } from 'amos-tool'; // import { Store, DES } from 'amos-tool';
import Footer from './Footer'; // import Footer from './Footer';
import { securityKey } from '../../consts/urlConsts'; // import { securityKey } from '../../consts/urlConsts';
import { cacheConsts } from './../../utils/cacheUtils'; // import { cacheConsts } from './../../utils/cacheUtils';
import * as endConf from 'amos-processor/lib/config/endconf'; // import * as endConf from 'amos-processor/lib/config/endconf';
const AmosConfig = endConf.AmosConfig; // const AmosConfig = endConf.AmosConfig;
const accessToken = AmosConfig.autoLoginConf.accessToken; // const accessToken = AmosConfig.autoLoginConf.accessToken;
const lsTool = Store.lsTool; // const lsTool = Store.lsTool;
class LoginComponent extends Component { // class LoginComponent extends Component {
constructor(props) { // constructor(props) {
super(props); // super(props);
} // }
onBeforeLogin = (e) => { // onBeforeLogin = (e) => {
e["accessToken"] = accessToken; // e["accessToken"] = accessToken;
let pd = e.password; // let pd = e.password;
const enPwd = DES.encode(pd, securityKey); // const enPwd = DES.encode(pd, securityKey);
lsTool.write('xjInfo', enPwd); // lsTool.write('xjInfo', enPwd);
}; // };
goto = (authData,permissions) => { // goto = (authData,permissions) => {
lsTool.remove(cacheConsts.CURRENT_REGION); // lsTool.remove(cacheConsts.CURRENT_REGION);
const { roleTypeName } = authData.user.role; // const { roleTypeName } = authData.user.role;
if(roleTypeName === 'PERSONAL'){ // if(roleTypeName === 'PERSONAL'){
browserHistory.push('/console'); // browserHistory.push('/console');
}else{ // }else{
browserHistory.push('/region'); // browserHistory.push('/region');
} // }
}; // };
render() { // render() {
const desict = ( // const desict = (
<div className="amos-slogan" > // <div className="amos-slogan" >
<span></span> // <span></span>
</div> // </div>
); // );
return ( // return (
<Login // <Login
// logo="/src/assets/auth/amos-logo.png//src/assets/auth/amos-logo.png" // // logo="/src/assets/auth/amos-logo.png//src/assets/auth/amos-logo.png"
logo={<div className='safety-logo'><img src='' alt='' /></div>} // logo={<div className='safety-logo'><img src='' alt='' /></div>}
title="IFC100消防指挥系统" // title="IFC100消防指挥系统"
goto={this.goto} // goto={this.goto}
desicOne={null} // desicOne={null}
desictTow={desict} // desictTow={desict}
footer={<Footer />} // footer={<Footer />}
showVerifyCode={false} // showVerifyCode={false}
onBeforeLogin={this.onBeforeLogin} // onBeforeLogin={this.onBeforeLogin}
/> // />
); // );
} // }
} // }
LoginComponent.propTypes = {}; // LoginComponent.propTypes = {};
export default LoginComponent; // export default LoginComponent;
This source diff could not be displayed because it is too large. You can view the blob instead.
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