import request from '@/utils/request'

// 查询气象预警列表
export function listMeteorological(query) {
  return request({
    url: '/crops/meteorological/list',
    method: 'get',
    params: query
  })
}

// 查询气象预警详细
export function getMeteorological(id) {
  return request({
    url: '/crops/meteorological/' + id,
    method: 'get'
  })
}

// 新增气象预警
export function addMeteorological(data) {
  return request({
    url: '/crops/meteorological',
    method: 'post',
    data: data
  })
}

// 修改气象预警
export function updateMeteorological(data) {
  return request({
    url: '/crops/meteorological',
    method: 'put',
    data: data
  })
}

// 删除气象预警
export function delMeteorological(id) {
  return request({
    url: '/crops/meteorological/' + id,
    method: 'delete'
  })
}
