import request from '@/utils/request'

// 查询公告资讯列表
export function listNews(query) {
  return request({
    url: '/szxc/news/list',
    method: 'get',
    params: query
  })
}

// 查询公告资讯详细
export function getNews(id) {
  return request({
    url: '/szxc/news/' + id,
    method: 'get'
  })
}

// 新增公告资讯
export function addNews(data) {
  return request({
    url: '/szxc/news',
    method: 'post',
    data: data
  })
}

// 修改公告资讯
export function updateNews(data) {
  return request({
    url: '/szxc/news',
    method: 'put',
    data: data
  })
}

// 删除公告资讯
export function delNews(id) {
  return request({
    url: '/szxc/news/' + id,
    method: 'delete'
  })
}
