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