| | |
| | | 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 { |
| | |
| | | console.error('Error setting timeout alert:', error); |
| | | throw error; |
| | | } |
| | | }; |
| | | }; |
| | | |
| | | /** |
| | | * 停止定时任务 |
| | | * @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; |
| | | } |
| | | } |