feat:增加修改密码后的提示
This commit is contained in:
@@ -270,7 +270,8 @@ const local: any = {
|
|||||||
usernameFormatError: 'Username can only contain letters, numbers and underscore',
|
usernameFormatError: 'Username can only contain letters, numbers and underscore',
|
||||||
usernameStartWithLetter: 'Username must start with a letter',
|
usernameStartWithLetter: 'Username must start with a letter',
|
||||||
usernameExists: 'Username already exists',
|
usernameExists: 'Username already exists',
|
||||||
validationError: 'Validation failed, please try again'
|
validationError: 'Validation failed, please try again',
|
||||||
|
passwordFormat:'The password needs to have letters or numbers',
|
||||||
},
|
},
|
||||||
resetPwd: {
|
resetPwd: {
|
||||||
title: 'Reset Password',
|
title: 'Reset Password',
|
||||||
|
|||||||
@@ -270,7 +270,8 @@ const local:any = {
|
|||||||
usernameFormatError: '用户名只能包含字母、数字和下划线',
|
usernameFormatError: '用户名只能包含字母、数字和下划线',
|
||||||
usernameStartWithLetter: '用户名必须以字母开头',
|
usernameStartWithLetter: '用户名必须以字母开头',
|
||||||
usernameExists: '该用户名已被使用',
|
usernameExists: '该用户名已被使用',
|
||||||
validationError: '验证失败,请重试'
|
validationError: '验证失败,请重试',
|
||||||
|
passwordFormat:'密码需要有字母或数字',
|
||||||
},
|
},
|
||||||
resetPwd: {
|
resetPwd: {
|
||||||
title: '重置密码',
|
title: '重置密码',
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import {
|
|||||||
Input,
|
Input,
|
||||||
Button as AButton,
|
Button as AButton,
|
||||||
Card as ACard,
|
Card as ACard,
|
||||||
Radio,
|
Radio, message,
|
||||||
} from 'ant-design-vue';
|
} from 'ant-design-vue';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import { resetPassword, resetPasswordByEmail } from '@/service/api/auth';
|
import { resetPassword, resetPasswordByEmail } from '@/service/api/auth';
|
||||||
@@ -132,13 +132,19 @@ async function handleSubmit() {
|
|||||||
password: formModel.password
|
password: formModel.password
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
message.success({
|
||||||
|
content: t('page.login.resetPwd.resetSuccess'),
|
||||||
|
duration: 2
|
||||||
|
});
|
||||||
|
|
||||||
|
// 延迟跳转
|
||||||
|
setTimeout(() => {
|
||||||
|
router.push('/userInfo/usercard');
|
||||||
|
}, 2000);
|
||||||
|
|
||||||
window.$message?.success(t('page.login.resetPwd.resetSuccess'));
|
|
||||||
// 重置成功后返回个人信息页面
|
|
||||||
router.push('/userInfo/usercard');
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Reset password failed:', error);
|
console.error('Reset password failed:', error);
|
||||||
window.$message?.error(t('page.login.resetPwd.resetFailed'));
|
message.error(t('page.login.resetPwd.resetFailed'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user