From 0a384d93299aa97e988122aa7d3e992eede7be04 Mon Sep 17 00:00:00 2001
From: zhangchen <1652267879@qq.com>
Date: 星期五, 20 六月 2025 16:34:33 +0800
Subject: [PATCH] ID1643-副屏添加医嘱展示完成
---
src/utils/httpApi.ts | 29 +++++++++++++++++++++++++++++
1 files changed, 29 insertions(+), 0 deletions(-)
diff --git a/src/utils/httpApi.ts b/src/utils/httpApi.ts
index e35467c..b2f1e18 100644
--- a/src/utils/httpApi.ts
+++ b/src/utils/httpApi.ts
@@ -15,6 +15,7 @@
}
const apiBaseUrl = 'https://backend.ihemodialysis.com'; // 替换为你的API基础URL
+// const apiBaseUrl = 'https://testbs.ihemodialysis.com'; // 替换为你的API基础URL
export const setTimeoutAlert = async (requestData: SetTimeoutAlertRequest): Promise<ApiResponse> => {
try {
@@ -28,4 +29,32 @@
console.error('Error setting timeout alert:', error);
throw error;
}
+};
+
+export const sendValidateCode = async (requestData): Promise<ApiResponse> => {
+ try {
+ const response = await axios.post(`${apiBaseUrl}/user/info/sendValidateCodeForRegister`, requestData, {
+ headers: {
+ 'Content-Type': 'application/x-www-form-urlencoded'
+ }
+ });
+ return response.data;
+ } catch (error) {
+ console.error('Error setting timeout alert:', error);
+ throw error;
+ }
+};
+
+export const registerForNutrition = async (requestData): Promise<ApiResponse> => {
+ try {
+ const response = await axios.post(`${apiBaseUrl}/user/info/registerForNutrition`, requestData, {
+ headers: {
+ 'Content-Type': 'application/json'
+ }
+ });
+ return response.data;
+ } catch (error) {
+ console.error('Error setting timeout alert:', error);
+ throw error;
+ }
};
\ No newline at end of file
--
Gitblit v1.8.0