import {axios} from '@/util/axios/request'

const api = {
  getPage: '/base/app/version/page',
  getDetail: '/base/app/version/',
  deleteOne: '/base/app/version/',
  save: '/base/app/version/',
  getConsumePage: '/base/app/version/consume/list',
}

export default api

export function getPage(parameter) {
  return axios({
    url: api.getPage,
    method: 'post',
    data: parameter,
    useFullLoading: true
  })
}

export function getDetail(id) {
  return axios({
    url: api.getDetail + id,
    method: 'get',
    useFullLoading: true
  })
}

export function deleteOne(id) {
  return axios({
    url: api.deleteOne + id,
    method: 'delete',
  })
}


export function save(data) {
  return axios({
    url: api.save,
    method: 'post',
    data: data,
    useFullLoading: true
  })
}
export function add(data) {
  return axios({
    url: api.save,
    method: 'post',
    data: data,
    useFullLoading: true
  })
}

export function getConsumePage(parameter) {
  return axios({
    url: api.getConsumePage,
    method: 'post',
    data: parameter
  })
}

