登录BUG修改

This commit is contained in:
a0049873 2022-12-02 17:45:32 +08:00
parent 073713cf95
commit dc2fe63682
2 changed files with 7 additions and 1 deletions

View File

@ -24,6 +24,10 @@ let loadingInstance
*/ */
const handleCode = (code, msg, res) => { const handleCode = (code, msg, res) => {
switch (code) { switch (code) {
case 0:
case 1:
case 200:
break
case 401: case 401:
store.dispatch('user/resetAll').catch(() => {}) store.dispatch('user/resetAll').catch(() => {})
break break
@ -43,6 +47,8 @@ const handleCode = (code, msg, res) => {
case 302: case 302:
// window.location.href = redirect // window.location.href = redirect
break break
default:
message.error(msg || '接口异常')
} }
} }

View File

@ -174,7 +174,7 @@
await this.$router.push('/home') await this.$router.push('/home')
} }
} catch (error) { } catch (error) {
message.error('登陆失败,用户名或密码错误!') // message.error('')
} }
}, },
}, },