Commit 9970093d by chenjinjing

no message

parent 5454e9a9
<config>
<port>9099</port>
<sign>xxx90909082fsdahfjosadjfpoiwausjorip2hjklrhn1ioud0u124rx0qwejfokasjfolksaujfoas</sign>
<dbServer>http://192.168.0.105:40012</dbServer>
<dbServer>http://192.168.0.71:40012</dbServer>
</config>
\ No newline at end of file
......@@ -225,12 +225,17 @@ export async function changePassword(uId:string, pwd:string, newPwd:string, conf
if (!enterpriseInfo.uId) throw new BizError(ERRORENUM.数据不存在);
/**验证当前密码 */
if (pwd != enterpriseInfo.pwd) throw new BizError(ERRORENUM.原密码错误);
const encryptedInputPwd = getPwdMd5(enterpriseInfo.uId, pwd);
if (enterpriseInfo.pwd !== encryptedInputPwd) {
throw new BizError(ERRORENUM.原密码错误);
}
// if (pwd != enterpriseInfo.pwd) throw new BizError(ERRORENUM.原密码错误);
if (newPwd != confirmPwd) throw new BizError(ERRORENUM.密码不一致);
if (newPwd.search(/^[A-Za-z0-9]{6,18}$/) < 0) throw new BizError(ERRORENUM.密码只能由618位字符和数字组成);
await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.企业用户表, {pwd:newPwd}, { uId });
let encryptedInputNewPwd = getPwdMd5(enterpriseInfo.uId, newPwd);
await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.企业用户表, {pwd:encryptedInputNewPwd}, { uId });
return {isSuccess:true};
}
......
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