mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-06-12 10:00:56 +08:00
v1.9 登陆错误信息提示
This commit is contained in:
parent
fb7bc2c7b9
commit
b0260112e5
@ -13,7 +13,7 @@ export function login(data) {
|
|||||||
// 可以在这里添加其他登录成功后的处理
|
// 可以在这里添加其他登录成功后的处理
|
||||||
resolve(res)
|
resolve(res)
|
||||||
} else {
|
} else {
|
||||||
reject(new Error(res.msg || '登录失败'))
|
reject(res.msg || '登录失败')
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
reject(error)
|
reject(error)
|
||||||
|
|||||||
@ -86,10 +86,13 @@ export default {
|
|||||||
this.loading = true;
|
this.loading = true;
|
||||||
try {
|
try {
|
||||||
const { data } = await login(this.loginForm).catch(error => {
|
const { data } = await login(this.loginForm).catch(error => {
|
||||||
this.$message.error(error.response.data);
|
this.$message.error(error);
|
||||||
this.refreshCaptcha();
|
this.refreshCaptcha();
|
||||||
return { data: [] };
|
return { data: [] };
|
||||||
});
|
});
|
||||||
|
if (!data || data.length == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (data && data.length > 1) {
|
if (data && data.length > 1) {
|
||||||
this.$refs.selectLoginUserRef.openDialog(data);
|
this.$refs.selectLoginUserRef.openDialog(data);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user