2
0

feat:增加修改密码后的提示

This commit is contained in:
zhongzm
2025-02-15 14:35:00 +08:00
parent 93579c7dde
commit f92107dbbb
3 changed files with 15 additions and 7 deletions

View File

@@ -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
});
// 延迟跳转
setTimeout(() => {
router.push('/userInfo/usercard');
}, 2000);
window.$message?.success(t('page.login.resetPwd.resetSuccess'));
// 重置成功后返回个人信息页面
router.push('/userInfo/usercard');
} catch (error) {
console.error('Reset password failed:', error);
window.$message?.error(t('page.login.resetPwd.resetFailed'));
message.error(t('page.login.resetPwd.resetFailed'));
}
}