You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
608 B

import type { Device, GetDeviceListParams } from './types'
import { defHttp } from '@/utils/http/axios'
export function getDeviceList(params: GetDeviceListParams) {
return defHttp.get<PageResult<Device>>({
url: '/device/page',
params,
})
}
export function createDevice(data: Partial<Device>) {
return defHttp.post({
url: '/device/save',
data,
})
}
export function updateDevice(data: Partial<Device>) {
return defHttp.post({
url: '/device/update',
data,
})
}
export function deleteDevice(id: string) {
return defHttp.post({
url: `/device/remove?id=${id}`,
})
}