v1.9 登陆错误信息提示

This commit is contained in:
wuxw 2025-08-26 17:25:53 +08:00
parent fb7bc2c7b9
commit b0260112e5
2 changed files with 5 additions and 2 deletions

View File

@ -13,7 +13,7 @@ export function login(data) {
// 可以在这里添加其他登录成功后的处理
resolve(res)
} else {
reject(new Error(res.msg || '登录失败'))
reject(res.msg || '登录失败')
}
}).catch(error => {
reject(error)

View File

@ -86,10 +86,13 @@ export default {
this.loading = true;
try {
const { data } = await login(this.loginForm).catch(error => {
this.$message.error(error.response.data);
this.$message.error(error);
this.refreshCaptcha();
return { data: [] };
});
if (!data || data.length == 0) {
return;
}
if (data && data.length > 1) {
this.$refs.selectLoginUserRef.openDialog(data);