import request from '@/utils/request'

// 查询消息列表
export function getMessage(params) {
  return request({
    url: '/system/news/list',
    params
  })
}

// 按标题时间搜索消息
export function searchMessage(params) {
  console.log(params);
  return request({
    url: 'system/news/queryNews',
    params
  })
}

// 删除消息
export function deleteMessage(id) {
  return request({
    url: 'system/news/remove/' + id,
    method: 'delete',
  })
}

// 新增消息
export function addMessage(data) {
  return request({
    url: 'system/news/add',
    method: 'post',
    data
  })
}
