疯狂的狮子li
2021-11-17 1c8d44b3094b0f0bae18abeb5fffc8b59c50f9b7
ruoyi-ui/src/utils/request.js
@@ -5,6 +5,8 @@
import errorCode from '@/utils/errorCode'
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
// 对应国际化资源文件后缀
axios.defaults.headers['Content-Language'] = 'zh_CN'
// 创建axios实例
const service = axios.create({
  // axios中请求配置有baseURL选项,表示请求URL公共部分
@@ -63,7 +65,7 @@
        }
      ).then(() => {
        store.dispatch('LogOut').then(() => {
          location.href = '/index';
          location.href = process.env.VUE_APP_CONTEXT_PATH + "index";
        })
      }).catch(() => {});
      return Promise.reject('无效的会话,或者会话已过期,请重新登录。')