import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/api/push/list',
    method: 'get',
    params: query
  })
}

export function OffLineOrOnLine(data) {
  console.log(data)
  return request({
    url: '/api/push/list/update',
    method: 'post',
    data
  })
}

export function CreatePush(data) {
  return request({
    url: '/api/push/create',
    method: 'post',
    data
  })
}

export function fetchPushDetail(id) {
  return request({
    url: '/api/push/detail',
    method: 'get',
    params: { id }
  })
}
