From 2191b6011fdab3b76344fc2447b8b6aaa972b6c1 Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期四, 07 八月 2025 15:48:09 +0800
Subject: [PATCH] 加入完整日志

---
 src/utils/axios.ts |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/utils/axios.ts b/src/utils/axios.ts
index a4ded42..3771f0b 100644
--- a/src/utils/axios.ts
+++ b/src/utils/axios.ts
@@ -1,10 +1,10 @@
 import axios, {AxiosError, AxiosResponse} from 'axios'
 import { Session } from '@/utils/storage'
 import { ElMessage } from 'element-plus'
-import { confingInfoStore } from '@/stores/StoresConfing'
+import { ipcRenderer } from 'electron'
 
-let BASE_URL = 'http://testbs.ihemodialysis.com'
-// let BASE_URL = 'https://hemobs.icoldchain.cn'
+
+let BASE_URL = 'https://hemobs.icoldchain.cn'
 const TIME_OUT = 10 * 1000
 
 // setTimeout(()=>{
@@ -42,6 +42,7 @@
         if (Session.get('token')) {
             response.headers.common['Authorization'] = 'Bearer '+ `${Session.get('token')}`
         }
+        ipcRenderer.invoke('logger', `http请求参数:${JSON.stringify(response)}`)
         return response
     },
     (error) => Promise.reject(error)
@@ -50,6 +51,7 @@
 // 后置拦截器(获取到响应时的拦截)
 instance.interceptors.response.use(
     (res: AxiosResponse) => {
+        ipcRenderer.invoke('logger', `http响应参数:${JSON.stringify(res)}`)
         if (String(res.status).indexOf('2') !== 0) {
             return {
                 code: res.status,

--
Gitblit v1.8.0