找回密码次数上限+找回密码确认密码优化

This commit is contained in:
谢思 2021-11-08 16:39:37 +08:00
parent 76fdff6737
commit 66e1235c3b
2 changed files with 7 additions and 2 deletions

View File

@ -33,7 +33,7 @@ function Login(props){
autologin: values.remember?1:0,
}).then((response) => {
if (!response.data.login) {
setMessage("错误的账号或密码");
response.data.status === -2 ? setMessage(response.data.message) : setMessage("错误的账号或密码");
} else {
//
cookie.save('autologin',values.remember);

View File

@ -75,7 +75,12 @@ function ResetPassword(props) {
//
function comfirmPassWord(rule, value, callback, index) {
if ((index === 2 && value && form.getFieldValue('psd') && value !== form.getFieldValue('psd')) || (index === 1 && value && form.getFieldValue('psdComfirm') && value !== form.getFieldValue('psdComfirm'))) {
if(index===1){
form.setFields({psdComfirm: {value:form.getFieldValue('psdComfirm'),errors:[new Error('密码不一致,请重新输入')]}});
callback();
}else{
callback('密码不一致,请重新输入');
}
} else {
callback();
}