From 02a346b1b78c8d2b6b3c298ed2fb8feea8ef96ee Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期三, 31 十二月 2025 15:49:08 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10105/r/ERP_override
---
north-glass-erp/northglass-erp/src/utils/request.js | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/utils/request.js b/north-glass-erp/northglass-erp/src/utils/request.js
index bde0ca0..e4a203b 100644
--- a/north-glass-erp/northglass-erp/src/utils/request.js
+++ b/north-glass-erp/northglass-erp/src/utils/request.js
@@ -1,10 +1,9 @@
import axios from 'axios'
-import config from '../../config'
import useUserInfoStore from '@/stores/userInfo'
const userStore=useUserInfoStore()
const request = axios.create({
- baseURL: `http://${config.serverUrl}`, // 娉ㄦ剰锛侊紒 杩欓噷鏄叏灞�缁熶竴鍔犱笂浜� 鍚庣鎺ュ彛鍓嶇紑 鍓嶇紑锛屽悗绔繀椤昏繘琛岃法鍩熼厤缃紒
- timeout: 30000
+ baseURL: `http://${window.ipConfig.serverUrl}`, // 娉ㄦ剰锛侊紒 杩欓噷鏄叏灞�缁熶竴鍔犱笂浜� 鍚庣鎺ュ彛鍓嶇紑 鍓嶇紑锛屽悗绔繀椤昏繘琛岃法鍩熼厤缃紒
+ timeout: 60000
})
//
@@ -15,7 +14,7 @@
request.interceptors.request.use(config => {
config.headers['Content-Type'] = 'application/json;charset=utf-8';
if(userStore.user){
- config.headers['satoken'] = userStore.user.token;
+ config.headers['satoken'] = localStorage.getItem('saToken');
}
// 璁剧疆璇锋眰澶�
return config
--
Gitblit v1.8.0