董国庆
2025-09-12 527efb36f35b471710e445972673abff45bacdac
401跳转登录
2个文件已修改
12 ■■■■ 已修改文件
laboratory/src/utils/request.js 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
laboratory/vue.config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
laboratory/src/utils/request.js
@@ -57,7 +57,7 @@
        console.error('数据解密失败:', e);
      }
    }
console.log('res.data',res.data)
    if (res.data.code == 200) {
      console.log('res.data',res.data)
@@ -71,8 +71,8 @@
            type: 'warning',
            duration: 2000
          })
          // sessionStorage.clear();
          // window.location.replace('/');
          sessionStorage.clear();
          window.location.replace('/');
          return Promise.reject(res.data.data.data)
        }
        Message({
@@ -95,8 +95,8 @@
          type: 'warning',
          duration: 2000
        })
        // sessionStorage.clear();
        // window.location.replace('/');
        sessionStorage.clear();
        window.location.replace('/');
        return Promise.reject(res.data.data)
      }
      Message({
laboratory/vue.config.js
@@ -11,7 +11,7 @@
    proxy: {
      "/": {
        // 设置以什么前缀开头的请求用来代理
        target: "http://192.168.110.34:11223", //要访问的跨域的域名
        target: "http://192.168.110.34:11221", //要访问的跨域的域名
        secure: false, // 使用的是http协议则设置为false,https协议则设置为true
        changeOrigin: true, //开启代理
        pathRewrite: {