Commit b0260112e5ff9fb9f29982b1ae2c9e8959bf49b3
1 parent
fb7bc2c7
v1.9 登陆错误信息提示
Showing
2 changed files
with
5 additions
and
2 deletions
src/api/user/loginApi.js
src/views/user/login/Login.vue
| ... | ... | @@ -86,10 +86,13 @@ export default { |
| 86 | 86 | this.loading = true; |
| 87 | 87 | try { |
| 88 | 88 | const { data } = await login(this.loginForm).catch(error => { |
| 89 | - this.$message.error(error.response.data); | |
| 89 | + this.$message.error(error); | |
| 90 | 90 | this.refreshCaptcha(); |
| 91 | 91 | return { data: [] }; |
| 92 | 92 | }); |
| 93 | + if (!data || data.length == 0) { | |
| 94 | + return; | |
| 95 | + } | |
| 93 | 96 | |
| 94 | 97 | if (data && data.length > 1) { |
| 95 | 98 | this.$refs.selectLoginUserRef.openDialog(data); | ... | ... |