Appearance
获取摄像头列表
方法名
getDeviceList
用法
用法如下
js
module.getDeviceList({
success: (res : any) => {
console.log(res)
},
fail: (res : any) => {
console.log(res)
},
complete: (res : any) => {
console.log(res)
}
})参数说明
| 参数名 | 参数类型 | 是否必填 | 默认值 | 参数描述 |
|---|---|---|---|---|
| success | Function | 否 | 无 | 执行成功的函数 |
| fail | Function | 否 | 无 | 执行失败的函数 |
| complete | Function | 否 | 无 | 执行完成的函数,不管成功还是失败都会执行 |
回调
示例
json
{
"message": "",
"code": 0,
"data": {
"deviceList": [
{
"productId": 12337,
"productName": "RXGD-CAMERA",
"serialNumber": "200901010001",
"deviceName": "/dev/bus/usb/003/003",
"vendorId": 3034,
"deviceId": 3003
}
]
}
}回调说明
| 参数名 | 参数类型 | 参数描述 |
|---|---|---|
| message | String | 消息提示 |
| data | Object | 数据对象 |
| data.deviceList | Array[Object] | 摄像头数据集合 |
| data.deviceList.productId | Integer | 产品id |
| data.deviceList.productName | String | 产品名称 |
| data.deviceList.serialNumber | String | 串口号 |
| data.deviceList.deviceName | String | 设备名称 |
| data.deviceList.vendorId | Integer | 厂家id |
| data.deviceList.deviceId | Integer | 设备id |
| code | Integer | 返回类型,0.成功,其他:失败 |