import request from '@/utils/request'

// 查询我的近况列表
export function listPublish(query) {
  return request({
    url: '/system/publish/list',
    method: 'get',
    params: query
  })
}

// 查询我的近况详细
export function getPublish(id) {
  return request({
    url: '/system/publish/' + id,
    method: 'get'
  })
}

// 新增我的近况
export function addPublish(data) {
  return request({
    url: '/system/publish',
    method: 'post',
    data: data
  })
}

// 修改我的近况
export function updatePublish(data) {
  return request({
    url: '/system/publish',
    method: 'put',
    data: data
  })
}

// 删除我的近况
export function delPublish(id) {
  return request({
    url: '/system/publish/' + id,
    method: 'delete'
  })
}

// 导出我的近况
export function exportPublish(query) {
  return request({
    url: '/system/publish/export',
    method: 'get',
    params: query
  })
}
// 获取评论列表
export function listComment(id) {
  return request({
    url: '/system/publish/listComment/'+id,
    method: 'get'
  })
}
// 删除一条评论
export function delComment(id) {
  return request({
    url: '/system/publish/delComment/'+id,
    method: 'get'
  })
}