import request from '@/utils/request'

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

// 查询新闻咨询详细
export function getNews(newsId) {
  return request({
    url: '/hezhi/news/' + newsId,
    method: 'get'
  })
}

// 新增新闻咨询
export function addNews(data) {
  return request({
    url: '/hezhi/news',
    method: 'post',
    data: data
  })
}

// 修改新闻咨询
export function updateNews(data) {
  return request({
    url: '/hezhi/news',
    method: 'put',
    data: data
  })
}

// 删除新闻咨询
export function delNews(newsId) {
  return request({
    url: '/hezhi/news/' + newsId,
    method: 'delete'
  })
}
