添加降雨服务器配置
This commit is contained in:
@@ -55,6 +55,9 @@ import type { XianSchool } from '@/types/base/XianSchool';
|
||||
import type { XianBridge } from '@/types/base/XianBridge.ts';
|
||||
import type { XianReservoirList } from '@/types/base/XianReservoirList';
|
||||
import type { XianSubwayStations } from '@/types/base/XianSubwayStations';
|
||||
import type { RainfallGridRequest } from '@/types/rainstorm/RainfallGridRequest';
|
||||
import type { RainfallGridResponse } from '@/types/rainstorm/RainfallGridResponse';
|
||||
import { getRainfallGrid } from './meteorology';
|
||||
|
||||
/**
|
||||
* API接口统一导出对象
|
||||
@@ -277,4 +280,16 @@ export const $api = {
|
||||
): Promise<ApiResponse<XianSubwayStations>> =>
|
||||
getSubwayStationsPointDetailById(id),
|
||||
},
|
||||
|
||||
// 气象信息
|
||||
meteorology: {
|
||||
/**
|
||||
* 获取网格天气信息
|
||||
* @param request - 请求参数
|
||||
* @returns 网格天气信息
|
||||
*/
|
||||
getRainfallGrid: (
|
||||
request: RainfallGridRequest
|
||||
): Promise<ApiResponse<RainfallGridResponse>> => getRainfallGrid(request),
|
||||
},
|
||||
};
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
import type { ApiResponse } from '@/types/ApiResponse';
|
||||
import type { RainfallGridRequest } from '@/types/rainstorm/RainfallGridRequest';
|
||||
import type { RainfallGridResponse } from '@/types/rainstorm/RainfallGridResponse';
|
||||
import httpInstance from '@/utils/request/http';
|
||||
|
||||
/**
|
||||
* 获取降雨栅格数据
|
||||
* @returns 降雨栅格数据
|
||||
*/
|
||||
export const getRainfallGrid = (
|
||||
request: RainfallGridRequest
|
||||
): Promise<ApiResponse<RainfallGridResponse>> => {
|
||||
return httpInstance.post('/algorithm-api/rainfall/grid', request);
|
||||
};
|
||||
Reference in New Issue
Block a user