import request from '@/utils/request'

// 查询消息发布列表
export function listContent(query) {
  return request({
    url: '/laboratory/content/list',
    method: 'get',
    params: query
  })
}
// 查询我的管理员消息
export function myAdminlistContent() {
  return request({
    url: '/laboratory/content/my/list',
    method: 'get'
  })
}
// 查询我的所有消息
export function myAlllistContent(query) {
  return request({
    url: '/laboratory/content/myAll/list',
    method: 'get',
    params: query
  })
}
// 查询我的所有消息数量
export function myAllCountContent() {
  return request({
    url: '/laboratory/content/myAll/count',
    method: 'get'
  })
}
// 查询消息发布详细
export function getContent(id) {
  return request({
    url: '/laboratory/content/' + id,
    method: 'get'
  })
}

// 新增消息发布
export function addContent(data) {
  return request({
    url: '/laboratory/content',
    method: 'post',
    data: data
  })
}

// 修改消息发布
export function updateContent(data) {
  return request({
    url: '/laboratory/content',
    method: 'put',
    data: data
  })
}

// 删除消息发布
export function delContent(id) {
  return request({
    url: '/laboratory/content/' + id,
    method: 'delete'
  })
}

// 查询消息发布列表
export function contentInfo(id) {
  return request({
    url: '/laboratory/content/'+id,
    method: 'get',
  })
}
