import request from '@/utils/request'

export function listNews(query) {
  return request({
    url: '/news/list',
    method: 'post',
    data: query
  })
}

export function createNews(data) {
  return request({
    url: '/news/create',
    method: 'post',
    data
  })
}

export function readNews(data) {
  return request({
    url: '/news/read',
    method: 'get',
    data
  })
}

export function updateNews(data) {
  return request({
    url: '/news/update',
    method: 'post',
    data
  })
}

export function updateNewsAuth(data) {
  return request({
    url: '/news/updateNewsAuth',
    method: 'post',
    data
  })
}


export function deleteNews(data) {
  return request({
    url: '/news/delete',
    method: 'post',
    data
  })
}

export function deleteAllNews(data) {
  return request({
    url: '/news/deleteQuantity',
    method: 'post',
    params: data
  })
}

export function listActivityOrg(data) {
  return request({
    url: '/news/listActivityOrg',
    method: 'get',
    params: data
  })
}
export function listCommon(data) {
  return request({
    url: '/newsComment/listCommon',
    method: 'get',
    params: data
  })
}
export function deleteCommon(data) {
  return request({
    url: '/newsComment/deleteCommon',
    method: 'post',
    data
  })
}
  export function deleteAllConent(data) {
    return request({
      url: '/newsComment/deleteQuantity',
      method: 'post',
      params: data
    })
}
