bick_back/src/api/system/device.js
2024-06-20 15:09:30 +08:00

77 lines
1.3 KiB
JavaScript

import request from '@/utils/request'
// 查询设备列表
export function listDevice(query) {
return request({
url: '/system/device/list',
method: 'get',
params: query
})
}
// 查询设备详细
export function getDevice(deviceId) {
return request({
url: '/system/device/' + deviceId,
method: 'get'
})
}
// 新增设备
export function addDevice(data) {
return request({
url: '/system/device',
method: 'post',
data: data
})
}
// 修改设备
export function updateDevice(data) {
return request({
url: '/system/device',
method: 'put',
data: data
})
}
// 删除设备
export function delDevice(deviceId) {
return request({
url: '/system/device/' + deviceId,
method: 'delete'
})
}
// 查询所有车辆信息
export function allDevice() {
return request({
url: '/appVerify/allVehicleInfo',
method: 'get'
})
}
// 开锁
export function handleUnlocking(data){
return request({
url: '/system/device/admin/unlockingByMac?mac='+data.mac,
method: 'post'
})
}
// 关锁
export function handleLock(data){
return request({
url: '/system/device/admin/lockByMac?mac='+data.mac,
method: 'post'
})
}
// 响铃寻车
export function ring(data){
return request({
url: '/app/device/ringByMac?mac='+data.mac,
method: 'post'
})
}