From e65a116f1ff1d9d99a093f76a9b02a6d27bfb35e Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: Tue, 29 Apr 2025 08:47:50 +0800
Subject: [PATCH] 修改
---
src/utils/request.ts | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/utils/request.ts b/src/utils/request.ts
index ed8cf58..10500ec 100644
--- a/src/utils/request.ts
+++ b/src/utils/request.ts
@@ -15,13 +15,13 @@
service.interceptors.request.use(
(config) => {
- for (let key in config.data) {
- if (config.data[key] == '' && config.data[key] !== 0) {
- config.data[key] = null;
- }
- }
+ // for (let key in config.data) {
+ // if (config.data[key] == '' && config.data[key] !== 0) {
+ // config.data[key] = null;
+ // }
+ // }
if (Cookies.get('token')) {
- (<any>config.headers).common['Authorization'] = `${Cookies.get('token')}`;
+ (<any>config.headers).common['tk'] = `${Cookies.get('token')}`;
(<any>config.headers).common['uid'] = `${Cookies.get('uid')}`;
}
return config;
@@ -63,7 +63,7 @@
Session.clear();
window.location.href = '/';
});
- } else if (response.data.code && response.data.code === 'A0215') {
+ } else if (response.data.code && response.data.code === 405) {
ElMessage.error('token失效');
// logOut;
useLoginApi()
--
Gitblit v1.9.2