import request from '@/utils/request'

// 查询校内新闻列表
export function listNews(query) {
  return request({
    url: '/drivingSchool/system/news/list',
    method: 'get',
    params: query
  })
}

// 查询校内新闻详细
export function getNews(id) {
  return request({
    url: '/drivingSchool/system/news/' + id,
    method: 'get'
  })
}

// 新增校内新闻
export function addNews(data) {
  return request({
    url: '/drivingSchool/system/news',
    method: 'post',
    data: data
  })
}

// 修改校内新闻
export function updateNews(data) {
  return request({
    url: '/drivingSchool/system/news',
    method: 'put',
    data: data
  })
}

// 删除校内新闻
export function delNews(id) {
  return request({
    url: '/drivingSchool/system/news/' + id,
    method: 'delete'
  })
}
