Browse Source

请求新增状态码判断 500 也去登录

newStyle
douzhuo 2 years ago
parent
commit
6e695c5fe8
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/router/axios.js

+ 1
- 1
src/router/axios.js View File

@@ -64,7 +64,7 @@ axios.interceptors.response.use(res => {
const status = Number(res.status) || 200
const message = res.data.msg || errorCode[status] || errorCode['default']

if (status === 401) {
if (status === 401 || status === 500) {
idx++
if(idx==1){
Message({


Loading…
Cancel
Save