刘嘉炜
3 years ago
5 changed files with 51 additions and 7 deletions
-
26src/subpackage/device/js/device_fun.js
-
1src/subpackage/device/pages/air_conditioner/detail/detail.vue
-
10src/subpackage/device/pages/audio_manage/audio_manage.vue
-
2src/subpackage/device/pages/order_details/order_details.vue
-
11src/subpackage/device/pages/switch_manage/switch_manage.vue
@ -0,0 +1,26 @@ |
|||
|
|||
/* |
|||
硬件处理函数 |
|||
*/ |
|||
var DEVICE_FUN = { |
|||
|
|||
/* |
|||
@data:过滤数据 |
|||
@switchInfo:操作的设备信息 |
|||
使用: _data = DEVICE_FUN.AC_filterCloudACData(data,switchInfo); |
|||
场景: 目前需求只要求照明(中控状态更新,灯操控) 其它需要再对接 |
|||
注意: 涉及deviceApi.ouxuanac 接口的,理论上来说都需要做兼容去在逻辑中传入硬件信息判断是否是云中控 |
|||
*/ |
|||
AC_filterCloudACData(data,switchInfo){ |
|||
console.log("云中控参数检测 AC_filterCloudACData",data,switchInfo); |
|||
//处理云中控专用参数
|
|||
// 这里device是设备名 一旦出现云中控 设备id被 (OUXUANAC_CLOUD_+hardware_net_addr) 串起来的字符串覆盖
|
|||
if(!!switchInfo&&switchInfo.hardware_connect_method=="YZK"){ |
|||
data.device = "OUXUANAC_CLOUD_"+switchInfo.hardware_net_addr; |
|||
} |
|||
|
|||
return data |
|||
}, |
|||
} |
|||
|
|||
export default DEVICE_FUN; |
Write
Preview
Loading…
Cancel
Save
Reference in new issue