|
|
@ -1,7 +1,6 @@
|
|
|
|
import axios from 'axios'
|
|
|
|
import axios from 'axios'
|
|
|
|
import { Message, MessageBox } from 'element-ui'
|
|
|
|
import { Message, MessageBox } from 'element-ui'
|
|
|
|
import store from '../store'
|
|
|
|
import store from '../store'
|
|
|
|
import { delItem } from "@/utils/storage"
|
|
|
|
|
|
|
|
import { getToken } from '@/utils/auth'
|
|
|
|
import { getToken } from '@/utils/auth'
|
|
|
|
// 创建axios实例
|
|
|
|
// 创建axios实例
|
|
|
|
const service = axios.create({
|
|
|
|
const service = axios.create({
|
|
|
@ -39,7 +38,6 @@ service.interceptors.response.use(
|
|
|
|
type: 'warning'
|
|
|
|
type: 'warning'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
).then(() => {
|
|
|
|
).then(() => {
|
|
|
|
delItem('token')
|
|
|
|
|
|
|
|
sessionStorage.clear()
|
|
|
|
sessionStorage.clear()
|
|
|
|
localStorage.clear()
|
|
|
|
localStorage.clear()
|
|
|
|
window.location.href = "/";
|
|
|
|
window.location.href = "/";
|
|
|
|