Explorar o código

chore(api): 适配“获取设备属性列表”接口

ccnnde hai 2 meses
pai
achega
35241c6cef
Modificáronse 1 ficheiros con 2 adicións e 4 borrados
  1. 2 4
      src/services/iot.ts

+ 2 - 4
src/services/iot.ts

@@ -21,10 +21,8 @@ export async function getMqttUrl () {
 //获取设备属性列表
 export async function getDeviceProperties(deviceId:string){
   // const ret:any = await axios.get(`/api/iot/device/properties?id=${deviceId}`);
-  const ret:any = await axios.post(`/api/iot/device/properties`,{
-    deviceId:deviceId
-  });
-  return ret.list||[];
+  const ret:any = await axios.post(`/api/iot/device/properties/${deviceId}`);
+  return ret;
 }
 
 export async function subscribeProperties(devices:{deviceId:string; token:string;properties:string[]}[]){