Commit 57efe942 by end

修改密码

parent f85896b9
No preview for this file type
...@@ -30,10 +30,10 @@ class EditPassword extends Component { ...@@ -30,10 +30,10 @@ class EditPassword extends Component {
var id = Math.ceil(Math.random()*35); var id = Math.ceil(Math.random()*35);
res += chars[id]; res += chars[id];
} }
return res; return res;
} }
getCurrentDay(){ getCurrentDay(){
let date="" let date=""
date = moment(new Date()).format("YYYYMMDD") date = moment(new Date()).format("YYYYMMDD")
...@@ -52,41 +52,38 @@ class EditPassword extends Component { ...@@ -52,41 +52,38 @@ class EditPassword extends Component {
const public_key = '047214fe3a249b75b6ba92ee494e0a8a68c0a19893a480b3c28bf06cd5b7d621243c7f6704caa3b43ade6be15de11cabd185611a9edfdcf1b11d7a2478c67b4c1c' const public_key = '047214fe3a249b75b6ba92ee494e0a8a68c0a19893a480b3c28bf06cd5b7d621243c7f6704caa3b43ade6be15de11cabd185611a9edfdcf1b11d7a2478c67b4c1c'
const private_key = '00a2bbe941a177ca9f200d1c4d37e8f0b43b9cd2ea662304a05c064c6416e74d49' const private_key = '00a2bbe941a177ca9f200d1c4d37e8f0b43b9cd2ea662304a05c064c6416e74d49'
let salt="" let salt=""
let date="" let date=""
let key="" let key=""
let sign="" let sign=""
let newPassword="" let newPassword=""
let requestId="" let requestId=""
salt = this.generateCharacter(16) salt = this.generateCharacter(16)
console.log("validate-salt",salt) console.log("validate-salt",salt)
date = this.getCurrentDay() date = this.getCurrentDay()
console.log("validate-date",date) console.log("validate-date",date)
newPassword = sm2.doEncrypt(password+salt, public_key, 1); newPassword = sm2.doEncrypt(password+salt, public_key, 1);
requestId = sm2.doEncrypt(id+salt, public_key, 1) requestId = sm2.doEncrypt(id+salt, public_key, 1)
newPassword = "04" + newPassword newPassword = "04" + newPassword
requestId = "04" + requestId requestId = "04" + requestId
if(salt && date){ if(salt && date){
key = salt+date key = salt+date
console.log("validate-key",key) console.log("validate-key",key)
} }
sign="id="+requestId+"&password="+newPassword+"&salt="+salt+"&key="+key sign="id="+requestId+"&password="+newPassword+"&salt="+salt+"&key="+key
console.log("validate-sign",md5(sign)) console.log("validate-sign",md5(sign))
let parms={ let parms={
id:requestId, id:requestId,
password:newPassword, password:newPassword,
salt:salt, salt:salt,
sign: md5(sign) sign: md5(sign)
} }
// let passwordVal = { id, password }; // let passwordVal = { id, password };
accountUpdatePassword(parms); accountUpdatePassword(parms);
//关闭模态框 //关闭模态框
...@@ -119,7 +116,7 @@ class EditPassword extends Component { ...@@ -119,7 +116,7 @@ class EditPassword extends Component {
let { editeData } = this.props; let { editeData } = this.props;
console.log(editeData); console.log(editeData);
const remarkStyle = { //bug-12732-liyuan const remarkStyle = { //bug-12732-liyuan
marginBottom: 0, marginBottom: 0,
lineHeight: '1.8', lineHeight: '1.8',
fontSize: '12px' fontSize: '12px'
} }
......
...@@ -166,9 +166,9 @@ class UserTable extends Component { ...@@ -166,9 +166,9 @@ class UserTable extends Component {
"/index/manager/system/organization/fixuser", "/index/manager/system/organization/fixuser",
state:{ state:{
editeData: res, editeData: res,
departmentTree: _this.props.departmentTree, departmentTree: _this.props.departmentTree,
companyCode: _this.props.companyCode, companyCode: _this.props.companyCode,
siteCode: _this.props.siteCode siteCode: _this.props.siteCode
} }
} }
); );
...@@ -332,7 +332,6 @@ class UserTable extends Component { ...@@ -332,7 +332,6 @@ class UserTable extends Component {
currentPageSize={this.state.currentPageSize || 10} currentPageSize={this.state.currentPageSize || 10}
getAccountList={this.props.getAccountList} getAccountList={this.props.getAccountList}
updateUser={this.props.updateUser} updateUser={this.props.updateUser}
handleSearch={this.props.handleSearch}
/> />
) : null} ) : null}
{this.state.editPassword ? ( {this.state.editPassword ? (
......
...@@ -168,8 +168,11 @@ class ExamCheck extends Component { ...@@ -168,8 +168,11 @@ class ExamCheck extends Component {
} }
componentDidMount() { componentDidMount() {
const { getExamList } = this.props; let params = {
getExamList(); pageNo: 1,
pageSize: 20,
};
this.props.getExamList(params);
} }
getExamKeyword(event) { getExamKeyword(event) {
......
...@@ -26,9 +26,9 @@ let downText = createAction(Types.DOWNTXT); ...@@ -26,9 +26,9 @@ let downText = createAction(Types.DOWNTXT);
export { examList, fetching, paperList, paperFetching, pd, downText }; export { examList, fetching, paperList, paperFetching, pd, downText };
export function getExamList(data) { export function getExamList(params) {
let url = api.getExamList; let url = api.getExamList;
let params = getExamListUrl(url, data); // let params = getExamListUrl(url, data);
return dispatch => { return dispatch => {
dispatch({ type: Types.FETCHING }); dispatch({ type: Types.FETCHING });
return request({ return request({
......
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