From f6b0e262db2af5ca2e5ed76f95e746c1dd3c58e3 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期四, 01 二月 2024 15:17:47 +0800
Subject: [PATCH] 开发业务接口
---
company/src/utils/request.js | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/company/src/utils/request.js b/company/src/utils/request.js
index 2dbe4d3..2673a72 100644
--- a/company/src/utils/request.js
+++ b/company/src/utils/request.js
@@ -3,7 +3,7 @@
import pkg from '../../package'
import { trim } from './util'
import cache from '../plugins/cache'
-import { Message } from 'element-ui'
+import { Message, Loading } from 'element-ui'
axios.defaults.headers.common['Content-Type'] = 'application/json;charset=UTF-8'
const axiosInstance = axios.create({
@@ -41,8 +41,7 @@
// 鏂板缓鍝嶅簲鎷︽埅鍣�
axiosInstance.interceptors.response.use((response) => {
-
- console.log(response.status)
+ // console.log(response.status)
// debugger
// 璇锋眰澶辫触
if (response.status !== 200) {
@@ -55,7 +54,8 @@
// 鏈櫥褰�
if (response.data.code === 401) {
if (response.config.autoLogin !== false) {
- window.location.href = process.env.VUE_APP_ROUTER_MODE === 'history' ? '/#/login' : '/login'
+ location.reload()
+ // window.location.href = process.env.VUE_APP_ROUTER_MODE === 'history' ? '/login' : '/#/login'
}
return Promise.reject(response.data)
}
--
Gitblit v1.9.3