Compare commits

...

2 Commits

Author SHA1 Message Date
a0049873 6423153f5c Merge branch 'hi-ucs-dev' of http://192.168.124.50:3000/wuhongjian/hi-ucs into hi-ucs-dev 2022-12-02 17:45:52 +08:00
a0049873 dc2fe63682 登录BUG修改 2022-12-02 17:45:32 +08:00
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('')
} }
}, },
}, },