refactor: 优化登录逻辑并添加注释

This commit is contained in:
yangsy
2025-12-17 13:27:02 +08:00
parent 9af76bacbb
commit 6183bfd4d7
2 changed files with 18 additions and 20 deletions

View File

@@ -32,7 +32,17 @@ const { mutate: login, isPending: loading } = useMutation({
onError: (error) => {
console.error(error);
const errorFeedback = parseErrorFeedback(error);
window.$message.error(errorFeedback);
window.$dialog.destroyAll();
window.$dialog.error({
closable: false,
maskClosable: false,
title: '错误提示',
content: errorFeedback,
positiveText: '确认',
onPositiveClick: () => {
window.$message.destroyAll();
},
});
},
});
</script>