refactor: 优化登录逻辑并添加注释
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user