From f373e0c0797e1800bf066fdfbb748bb9242230f6 Mon Sep 17 00:00:00 2001
From: wangjuncheng <1>
Date: 星期二, 08 七月 2025 17:46:02 +0800
Subject: [PATCH] 泥位计

---
 src/api/requestTR.js |   18 +++---------------
 1 files changed, 3 insertions(+), 15 deletions(-)

diff --git a/src/api/requestTR.js b/src/api/requestTR.js
index 4076645..c404aac 100644
--- a/src/api/requestTR.js
+++ b/src/api/requestTR.js
@@ -1,25 +1,13 @@
 import axios from "axios";
 
-// 鍒ゆ柇褰撳墠鏄惁鏄紑鍙戠幆澧�
-let API_URL;
-
-if (process.env.NODE_ENV === 'development') {
-  // 寮�鍙戠幆澧冧娇鐢� '/api'
-  API_URL = '/api';
-} else {
-  // 鐢熶骇鐜浣跨敤瀹為檯鐨勯厤缃湴鍧�
-  API_URL = `${BASE_URL.endsWith('/') ? BASE_URL.slice(0, -1) : BASE_URL}/api`;
-}
-
 // 鍒涘缓 Axios 瀹炰緥
 const instance = axios.create({
-  baseURL: API_URL,
-  // timeout: 1000 * 60, // 璇锋眰瓒呮椂鏃堕棿锛堝崟浣嶏細姣锛�
+  baseURL: "/api", // 浣跨敤浣犻厤缃殑 /auth 浠g悊
+  timeout: 1000 * 60, // 璇锋眰瓒呮椂鏃堕棿锛堝崟浣嶏細姣锛�
   headers: {
-    "Content-Type": "application/x-www-form-urlencoded", // 榛樿璇锋眰澶�
+    "Content-Type": "application/x-www-form-urlencoded", // 榛樿璇锋眰澶碼pplication/json
   },
 });
-
 // 璇锋眰鎷︽埅鍣�
 // instance.interceptors.request.use(
 //   (config) => {

--
Gitblit v1.9.3