单应用项目,可以创建很多独立工具类页面 ,不用登录 初始化的页面
xg
chenyc
2025-05-13 a85ff64d09107a303d72f3bab17567f4d364f293
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// src/api/api.ts
 
import axios from 'axios';
 
interface SetTimeoutAlertRequest {
    deviceCode: string;
    minutes: number;
    alertText: string;
}
 
interface ApiResponse {
    code: number;
    data: string;
    message: string;
}
 
const apiBaseUrl = 'https://backend.ihemodialysis.com'; // 替换为你的API基础URL
 
export const setTimeoutAlert = async (requestData: SetTimeoutAlertRequest): Promise<ApiResponse> => {
    try {
        const response = await axios.post(`${apiBaseUrl}/patient/hemo/med/record/setTimeoutAlert`, requestData, {
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        });
        return response.data;
    } catch (error) {
        console.error('Error setting timeout alert:', error);
        throw error;
    }
};