import request from '@/utils/request/index.js'
import {
	timeFormat
} from '@/utils/utils.js'

/**
 * 预警信息模块
 */

//预警信息模块请求父类函数
const  warnRequest = async (url, data) => {
	const res = await request.post(`api/api_gateway?method=${url}`, data);
	return res?.data;
}


// 气象站、墒情站预警
export const getWeatherWarningList =  (data) =>  warnRequest('forecast.worm_lamp.qxz_warning', data);


// 测报灯预警
export const getPestWarningList =  (data) =>  warnRequest('forecast.worm_lamp.cbd_pest_warning', data);



// 病害-孢子仪预警
export const getDeviceWarningList =  (data) =>  warnRequest('device.device_picture.bzy_warning_list', data);
