|
@@ -8,7 +8,7 @@ hardwareHotList = {}
|
|
|
|
|
|
//热点 设备控制
|
|
|
|
|
|
-$("#hotPannel .close, #hotPannel .iconquxiao").on('click',()=>{
|
|
|
+$("#hotPannel .close, #hotPannel .iconquxiao").on('click',()=>{//关闭
|
|
|
$("#hotPannel>div").css("display","");
|
|
|
window.hotNeedUpdatePannel = null;
|
|
|
|
|
@@ -20,6 +20,29 @@ $("#hotPannel input.mui-switch").on('change',(e)=>{//灯
|
|
|
$("#hotPannel input.mui-switch").prop("checked", !ifOn) //error
|
|
|
})
|
|
|
})
|
|
|
+
|
|
|
+
|
|
|
+var deviceBtnBind = function($elem, paramCode, paramValue){
|
|
|
+ $elem.on('click',(e)=>{
|
|
|
+ paramValue = paramValue instanceof Function ? paramValue() : paramValue
|
|
|
+ window.changeDeviceStatus(window.hotNeedUpdatePannel, paramCode, paramValue, (a)=>{
|
|
|
+ hotNeedUpdatePannel.showPannel() //success update
|
|
|
+ })
|
|
|
+ })
|
|
|
+}
|
|
|
+//空调
|
|
|
+deviceBtnBind($("#hotPannel .ac-con .iconfengsu31"), '04', '3')// windSpeed
|
|
|
+deviceBtnBind($("#hotPannel .ac-con .iconfengsu2"), '04', '2')// windSpeed
|
|
|
+deviceBtnBind($("#hotPannel .ac-con .iconfengsu11"), '04', '1')// windSpeed
|
|
|
+deviceBtnBind($("#hotPannel .ac-con .minbtn .ac-btn").eq(0), '05', ()=>{return hotNeedUpdatePannel.temperature - 1 + ''})// temperature
|
|
|
+deviceBtnBind($("#hotPannel .ac-con .minbtn .ac-btn").eq(1), '05', ()=>{return hotNeedUpdatePannel.temperature + 1 + ''})// temperature
|
|
|
+deviceBtnBind($("#hotPannel .ac-con .ac-close"), '02', '0')// close
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
var getAjax = function(url, success, errorString){
|
|
|
$(".waiting").addClass('showloading')
|
|
|
$.ajax({//获取设备状态
|
|
@@ -15492,7 +15515,7 @@ window.Modernizr = function(n, e, t) {
|
|
|
/* if(window.MP_PREFETCHED_MODELDATA.flyInOnlyBySwitch){
|
|
|
|
|
|
}else{ */
|
|
|
- this.createTitleElem(d.infoAttribute.hardware ? d.infoAttribute.hardware.name : d.infoAttribute.title ))
|
|
|
+ this.createTitleElem(d.infoAttribute.hardware ? d.infoAttribute.hardware.name : d.infoAttribute.title )
|
|
|
//}
|
|
|
|
|
|
}
|
|
@@ -15656,7 +15679,7 @@ window.Modernizr = function(n, e, t) {
|
|
|
|
|
|
}else if(devType == "温湿度"){
|
|
|
$("#hotPannel>#temperature").removeClass("hide")
|
|
|
-
|
|
|
+ this.temperature = parseInt(temperature)
|
|
|
|
|
|
loadTemperature({
|
|
|
id:"temperature",//dom Id
|
|
@@ -15762,7 +15785,7 @@ window.Modernizr = function(n, e, t) {
|
|
|
if(data2.code == 0){
|
|
|
loadMonitor({
|
|
|
id:"monitor",
|
|
|
- url: data2.data.external.hls //'http://14.215.216.123:18080/rtp/00A153DF/hls.m3u8'
|
|
|
+ url: data2.data.external.wsFlv //'http://14.215.216.123:18080/rtp/00A153DF/hls.m3u8'
|
|
|
})
|
|
|
}
|
|
|
},"获取视频地址失败" )
|
|
@@ -15792,9 +15815,12 @@ window.Modernizr = function(n, e, t) {
|
|
|
var temperature = data.find(e=>e.paramCode == '05').paramValue
|
|
|
var fanPos = data.find(e=>e.paramCode == '06').paramValue
|
|
|
var fanState = data.find(e=>e.paramCode == '07').paramValue == '1'
|
|
|
+ this.temperature = parseInt(temperature)
|
|
|
+
|
|
|
|
|
|
- loadAirConditioner({
|
|
|
+ loadAirConditioner({
|
|
|
id:"air-conditioner",
|
|
|
+ name : hardware.name,
|
|
|
val:parseInt(temperature),
|
|
|
type: mode == 0 ? '自动': mode == 1 ? '除湿': mode == 2 ? '冷风': mode == 3 ? '送风' : '暖风',//模式
|
|
|
ifOn,//开关机
|