Commit d78f6422011f9cf04bd70e28949fa91e467623a5

Authored by fungleo
2 parents 26dfee2c b5689885

Merge remote-tracking branch 'upstream/master'

Showing 1 changed file with 2 additions and 5 deletions
ruoyi-ui/src/utils/request.js
... ... @@ -32,17 +32,14 @@ service.interceptors.response.use(res => {
32 32 // 获取错误信息
33 33 const msg = errorCode[code] || res.data.msg || errorCode['default']
34 34 if (code === 401) {
35   - MessageBox.confirm(
36   - '登录状态已过期,您可以继续留在该页面,或者重新登录',
37   - '系统提示',
38   - {
  35 + MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', {
39 36 confirmButtonText: '重新登录',
40 37 cancelButtonText: '取消',
41 38 type: 'warning'
42 39 }
43 40 ).then(() => {
44 41 store.dispatch('LogOut').then(() => {
45   - location.reload() // 为了重新实例化vue-router对象 避免bug
  42 + location.href = '/index';
46 43 })
47 44 })
48 45 } else if (code === 500) {
... ...