import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/station/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/station',
    method: 'post',
    data: obj
  })
}

export function getObj(code) {
  return request({
    url: '/station/' + code,
    method: 'get'
  })
}


export function getStationAll() {
  return request({
    url: '/station/all',
    method: 'get'
  })
}


export function delObj(id) {
  return request({
    url: '/station/' + id,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/station',
    method: 'put',
    data: obj
  })

}
