疯狂的狮子li
2022-05-12 af6a08398e2bc22f3c8a3a615cbd9e23190be906
ruoyi-ui/src/utils/request.js
@@ -12,6 +12,8 @@
export let isRelogin = { show: false };
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公共部分
@@ -86,7 +88,7 @@
      ).then(() => {
        isRelogin.show = false;
        store.dispatch('LogOut').then(() => {
          location.href = '/index';
          location.href = process.env.VUE_APP_CONTEXT_PATH + "index";
        })
      }).catch(() => {
        isRelogin.show = false;