From c403b0e3fa43b5771565dac51dd07c954cb57ad0 Mon Sep 17 00:00:00 2001
From: zhangchen <1652267879@qq.com>
Date: 星期二, 16 九月 2025 17:09:58 +0800
Subject: [PATCH] 移除test

---
 src/utils/httpApi.ts |   58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 56 insertions(+), 2 deletions(-)

diff --git a/src/utils/httpApi.ts b/src/utils/httpApi.ts
index b2f1e18..632b95f 100644
--- a/src/utils/httpApi.ts
+++ b/src/utils/httpApi.ts
@@ -14,8 +14,9 @@
     message: string;
 }
 
-const apiBaseUrl = 'https://backend.ihemodialysis.com'; // 替换为你的API基础URL
+// const apiBaseUrl = 'https://backend.ihemodialysis.com'; // 替换为你的API基础URL
 // const apiBaseUrl = 'https://testbs.ihemodialysis.com'; // 替换为你的API基础URL
+const apiBaseUrl = import.meta.env.VITE_API_BASE_URL;
 
 export const setTimeoutAlert = async (requestData: SetTimeoutAlertRequest): Promise<ApiResponse> => {
     try {
@@ -57,4 +58,57 @@
         console.error('Error setting timeout alert:', error);
         throw error;
     }
-};
\ No newline at end of file
+};
+
+/**
+ * 停止定时任务
+ * @param deviceCode 
+ * @returns 
+ */
+export const stopTimeoutAlert = async (deviceCode: string) => {
+    try {
+        const response = await axios.post(`${apiBaseUrl}/patient/hemo/med/record/stopTimeoutAlert`, { deviceCode }, {
+            headers: {
+                'Content-Type': 'application/x-www-form-urlencoded'
+            }
+        });
+        return response.data;
+    } catch (error) {
+        throw error;
+    }
+}
+
+/**
+ * 获取副屏最新的版本号Api
+ * @returns 
+ */
+export const getServiceVersionApi = async(version: string) => {
+    try {
+        const response = await axios.post(`${apiBaseUrl}/system/version/subscreen/showVersionDiff`, { version }, {
+            headers: {
+                'Content-Type': 'application/x-www-form-urlencoded'
+            }
+        });
+        return response.data;
+    } catch (error) {
+        throw error;
+    }
+}
+
+/**
+ * 推出登录
+ * @param deviceCode 
+ * @returns 
+ */
+export const logoutForSubScreen = async(deviceCode: string) => {
+    try {
+        const response = await axios.post(`${apiBaseUrl}/user/info/logoutForSubScreen`, { deviceCode }, {
+            headers: {
+                'Content-Type': 'application/x-www-form-urlencoded'
+            }
+        });
+        return response.data
+    } catch (error) {
+        throw error;
+    }
+}
\ No newline at end of file

--
Gitblit v1.8.0