import request from '@/utils/request'

export function listRealtimeNews(query) {
  return request({
    url: '/progress/realtimeNews/list',
    method: 'get',
    params: query
  })
}

export function getRealtimeNews(id) {
  return request({
    url: '/progress/realtimeNews/' + id,
    method: 'get'
  })
}

export function addRealtimeNews(data) {
  return request({
    url: '/progress/realtimeNews',
    method: 'post',
    data: data
  })
}

export function updateRealtimeNews(data) {
  return request({
    url: '/progress/realtimeNews',
    method: 'put',
    data: data
  })
}

export function delRealtimeNews(id) {
  return request({
    url: '/progress/realtimeNews/' + id,
    method: 'delete'
  })
}

export function updateTopStatus(id, isTop) {
  return request({
    url: '/progress/realtimeNews/top/' + id + '/' + isTop,
    method: 'put'
  })
}
