From 0487d2977bca1c0bb4a12a213b7325c7ec3fe540 Mon Sep 17 00:00:00 2001 From: peiyanni Date: Sun, 18 Jul 2021 14:30:26 +0800 Subject: [PATCH] Update axios.js --- report-ui/src/api/axios.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/report-ui/src/api/axios.js b/report-ui/src/api/axios.js index fea16722..26362f32 100644 --- a/report-ui/src/api/axios.js +++ b/report-ui/src/api/axios.js @@ -1,9 +1,5 @@ import axios from 'axios'; import { Message, MessageBox } from 'element-ui'; -import { getItem, delItem } from '@/utils/storage'; -import signUtil from '@/utils/signUtil'; -import { deepClone } from "@/utils" - axios.defaults.baseURL = process.env.BASE_API const service = axios.create({ withCredentials: false, @@ -15,8 +11,6 @@ const service = axios.create({ service.interceptors.request.use( config => { - // 在发送请求之前做些什么 - var token = getItem('token'); return config }, error => { @@ -42,7 +36,6 @@ service.interceptors.response.use( }).then(() => { sessionStorage.clear(); localStorage.clear(); - delItem('token') window.location.href = "/"; }).catch(err => { })