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

const api = {
  wisdomDevice: '/wisdom/wisdomDevice'
}

export function getWisdomDeviceList (parameter) {
  return axios({
    url: api.wisdomDevice + '/list',
    method: 'get',
    params: parameter
  })
}

export function saveWisdomDevice (parameter) {
  return axios({
    url: api.wisdomDevice + (parameter.id > 0 ? '/update' : '/save'),
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

export function delWisdomDevice (parameter) {
  return axios({
    url: api.wisdomDevice + '/remove',
    method: 'post',
    params: parameter
  })
}

export const wisdomDeviceExport = api.wisdomDevice + '/export'
