Merge remote-tracking branch 'upstream/master'
正在显示
1 个修改的文件
包含
2 行增加
和
5 行删除
| @@ -32,17 +32,14 @@ service.interceptors.response.use(res => { | @@ -32,17 +32,14 @@ service.interceptors.response.use(res => { | ||
| 32 | // 获取错误信息 | 32 | // 获取错误信息 |
| 33 | const msg = errorCode[code] || res.data.msg || errorCode['default'] | 33 | const msg = errorCode[code] || res.data.msg || errorCode['default'] |
| 34 | if (code === 401) { | 34 | if (code === 401) { |
| 35 | - MessageBox.confirm( | ||
| 36 | - '登录状态已过期,您可以继续留在该页面,或者重新登录', | ||
| 37 | - '系统提示', | ||
| 38 | - { | 35 | + MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { |
| 39 | confirmButtonText: '重新登录', | 36 | confirmButtonText: '重新登录', |
| 40 | cancelButtonText: '取消', | 37 | cancelButtonText: '取消', |
| 41 | type: 'warning' | 38 | type: 'warning' |
| 42 | } | 39 | } |
| 43 | ).then(() => { | 40 | ).then(() => { |
| 44 | store.dispatch('LogOut').then(() => { | 41 | store.dispatch('LogOut').then(() => { |
| 45 | - location.reload() // 为了重新实例化vue-router对象 避免bug | 42 | + location.href = '/index'; |
| 46 | }) | 43 | }) |
| 47 | }) | 44 | }) |
| 48 | } else if (code === 500) { | 45 | } else if (code === 500) { |
-
请 注册 或 登录 后发表评论