import request from '@/utils/request'

//获取通知公告列表
export function messagesList(params) {
    return request({
      url: '/messages',
      method: 'get',
      params
    })
  }
  //删除通知公告
  export function deleteMessages(data) {
    return request({
      url: '/messages/' +data,
      method: 'DELETE',
    })
  }
  //创建公告
  export function creatMessages(data) {
    return request({
      url: '/messages',
      method: 'post',
      data
    })
  }
    //编辑公告
    export function editMessages(data) {
        return request({
          url: '/messages/'+ data.id,
          method: 'put',
          data
        })
      }