|
@@ -1,6 +1,5 @@
|
|
|
import axios from 'axios';
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus';
|
|
|
-import { Session } from '/@/utils/storage';
|
|
|
import getOrigin from '/@/utils/origin'
|
|
|
|
|
|
// 配置新建一个 axios 实例
|
|
@@ -35,7 +34,7 @@ service.interceptors.response.use(
|
|
|
ElMessageBox.alert('登录状态已过期,请重新登录', '提示',
|
|
|
{ confirmButtonText: '确定', showCancelButton: false, closeOnHashChange: false, closeOnPressEscape: false, closeOnClickModal: false, showClose: false })
|
|
|
.then(() => {
|
|
|
- Session.clear(); // 清除浏览器全部临时缓存
|
|
|
+ localStorage.clear(); // 清除浏览器全部临时缓存
|
|
|
window.location.href = '/'; // 去登录页
|
|
|
})
|
|
|
.catch(() => { });
|