【功能完善】IoT: 场景联动产品设备信息回显
This commit is contained in:
@@ -165,5 +165,16 @@ export const DeviceApi = {
|
||||
// 获取设备MQTT连接参数
|
||||
getMqttConnectionParams: async (deviceId: number) => {
|
||||
return await request.get({ url: `/iot/device/mqtt-connection-params`, params: { deviceId } })
|
||||
},
|
||||
|
||||
// 根据ProductKey和DeviceNames获取设备列表
|
||||
getDevicesByProductKeyAndNames: async (productKey: string, deviceNames: string[]) => {
|
||||
return await request.get({
|
||||
url: `/iot/device/get-by-product-key-and-names`,
|
||||
params: {
|
||||
productKey,
|
||||
deviceNames: deviceNames.join(',')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,5 +78,10 @@ export const ProductApi = {
|
||||
// 查询产品(精简)列表
|
||||
getSimpleProductList() {
|
||||
return request.get({ url: '/iot/product/simple-list' })
|
||||
},
|
||||
|
||||
// 根据ProductKey获取产品信息
|
||||
getProductByKey: async (productKey: string) => {
|
||||
return await request.get({ url: `/iot/product/get-by-key`, params: { productKey } })
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user