pyt
2025-04-28 35743f996ade9e2993fb15a274bf3dbb6a3df9d7
laboratory/src/utils/request.js
@@ -15,7 +15,7 @@
// 请求拦截
service.interceptors.request.use(
  config => {
    config['headers']['Authorization'] = `${localStorage.getItem('token')}`
    config['headers']['Authorization'] = `${sessionStorage.getItem('token')}`
    if (config.method == 'get') {
      if (!config.params) config.params = {};
      config.params = {
@@ -54,7 +54,7 @@
          type: 'warning',
          duration: 2000
        })
        localStorage.clear();
        sessionStorage.clear();
        window.location.replace('/');
        return Promise.reject(res.data.data)
      }