qianlishi 3 years ago
commit 1c299a6aac

@ -1,6 +1,7 @@
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({
@ -38,11 +39,9 @@ service.interceptors.response.use(
type: 'warning' type: 'warning'
} }
).then(() => { ).then(() => {
// store.dispatch('FedLogOut').then(() => { delItem('token')
// // location.reload() // 为了重新实例化vue-router对象 避免bug sessionStorage.clear()
// window.location.href = "/"; localStorage.clear()
// })
location.reload();
window.location.href = "/"; window.location.href = "/";
}) })
} }

Loading…
Cancel
Save