Files
app-govern/common/api/device.js
2023-07-10 20:20:00 +08:00

60 lines
1.1 KiB
JavaScript

import request from '../js/request'
import config from '../js/config'
// 获取设备
export function getDeviceList(params) {
return request({
url: '/cs-device-boot/EquipmentDelivery/queryEquipmentByProject',
method: 'post',
data: params,
})
}
/**
* 设备统计
* @param {*} id 工程id
* @returns
*/
export function getDevCount(id) {
return request({
url: '/cs-device-boot/deviceUser/devCount',
method: 'post',
data: { id },
})
}
// 获取直连设备模板信息
export function getModel(nDid) {
return request({
url: '/access-boot/device/model',
method: 'post',
data: {
nDid
},
})
}
// 直连设备接入
export function addDevice(params) {
return request({
url: '/access-boot/device/access',
method: 'post',
header: {
'Content-Type': 'application/json',
},
data: params,
})
}
// 直连设备注册
export function registerDevice(nDid) {
return request({
url: '/access-boot/device/register',
method: 'post',
data: {
nDid
},
})
}