forked from Gitlink/forgeplus-react
找回密码次数上限+找回密码确认密码优化
This commit is contained in:
parent
76fdff6737
commit
66e1235c3b
|
@ -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);
|
||||
|
|
|
@ -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'))) {
|
||||
callback('密码不一致,请重新输入');
|
||||
if(index===1){
|
||||
form.setFields({psdComfirm: {value:form.getFieldValue('psdComfirm'),errors:[new Error('密码不一致,请重新输入')]}});
|
||||
callback();
|
||||
}else{
|
||||
callback('密码不一致,请重新输入');
|
||||
}
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue