xzw 4 年之前
父節點
當前提交
c7061f429c
共有 2 個文件被更改,包括 18 次插入5 次删除
  1. 1 1
      index.html
  2. 17 4
      js/main_2020_show.js

+ 1 - 1
index.html

@@ -119,7 +119,7 @@
                     <span class="ac-btn fixed down"><i class="iconfont iconbofang"></i></span>
                     <span class="ac-btn fixed down"><i class="iconfont iconbofang"></i></span>
                     <span class="ac-btn fixed left"><i class="iconfont iconbofang"></i></span>
                     <span class="ac-btn fixed left"><i class="iconfont iconbofang"></i></span>
                     <span class="ac-btn fixed right"><i class="iconfont iconbofang"></i></span>
                     <span class="ac-btn fixed right"><i class="iconfont iconbofang"></i></span>
-                    <div>
+                    <div name='onoff'>
                         <span class="ac-btn">运行</span>
                         <span class="ac-btn">运行</span>
                         <span class="ac-btn">停止</span>
                         <span class="ac-btn">停止</span>
                     </div>
                     </div>

+ 17 - 4
js/main_2020_show.js

@@ -37,12 +37,22 @@ 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(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  .minbtn .ac-btn").eq(1),  '05', ()=>{return hotNeedUpdatePannel.temperature + 1 + ''})// temperature 
 deviceBtnBind($("#hotPannel .ac-con  .ac-close"),  '02', '0')// close 
 deviceBtnBind($("#hotPannel .ac-con  .ac-close"),  '02', '0')// close 
+//{"0":"自动","1":"除湿","2":"冷风","3":"送风","4":"暖风"}
+deviceBtnBind($('#hotPannel .ac-con  .airmode .ac-btn[data-name="自动"]'),  '03', '0')//mode
+deviceBtnBind($('#hotPannel .ac-con  .airmode .ac-btn[data-name="除湿"]'),  '03', '1')//mode
+deviceBtnBind($('#hotPannel .ac-con  .airmode .ac-btn[data-name="冷风"]'),  '03', '2')//mode
+deviceBtnBind($('#hotPannel .ac-con  .airmode .ac-btn[data-name="送风"]'),  '03', '3')//mode
+deviceBtnBind($('#hotPannel .ac-con  .airmode .ac-btn[data-name="暖风"]'),  '03', '4')//mode
+//风向 {"1":"上","2":"下","3":"左","4":"右"}
+deviceBtnBind($('#hotPannel .ac-con  .air-con .ac-btn.up'),  '06', '1')//fanPos
+deviceBtnBind($('#hotPannel .ac-con  .air-con .ac-btn.down'),  '06', '2')//fanPos
+deviceBtnBind($('#hotPannel .ac-con  .air-con .ac-btn.left'),  '06', '3')//fanPos
+deviceBtnBind($('#hotPannel .ac-con  .air-con .ac-btn.right'),  '06', '4')//fanPos
 
 
+deviceBtnBind($('#hotPannel .ac-con  .air-con [name="onoff"]').eq(0),  '06', '4')//fanState
+deviceBtnBind($('#hotPannel .ac-con  .air-con [name="onoff"]').eq(1),  '06', '4')//fanState
 
 
 
 
-
- 
-
 var getAjax = function(url, success, errorString){
 var getAjax = function(url, success, errorString){
     $(".waiting").addClass('showloading')
     $(".waiting").addClass('showloading')
     $.ajax({//获取设备状态
     $.ajax({//获取设备状态
@@ -15822,11 +15832,14 @@ window.Modernizr = function(n, e, t) {
                                         id:"air-conditioner",
                                         id:"air-conditioner",
                                         name : hardware.name,
                                         name : hardware.name,
                                         val:parseInt(temperature),
                                         val:parseInt(temperature),
+                                        min:16,
+                                        max:30,
                                         type: mode == 0 ? '自动': mode == 1 ? '除湿': mode == 2 ? '冷风': mode == 3 ? '送风' : '暖风',//模式
                                         type: mode == 0 ? '自动': mode == 1 ? '除湿': mode == 2 ? '冷风': mode == 3 ? '送风' : '暖风',//模式
                                         ifOn,//开关机
                                         ifOn,//开关机
                                         windSpeed : windSpeed == 1 ? "低风" : windSpeed == 2 ? "中风" :  "高风",//风速
                                         windSpeed : windSpeed == 1 ? "低风" : windSpeed == 2 ? "中风" :  "高风",//风速
                                         fanPos : fanPos == 1 ? "上" : fanPos == 2 ? "下" : fanPos == 3  ? "左" : "右",//摆叶位置
                                         fanPos : fanPos == 1 ? "上" : fanPos == 2 ? "下" : fanPos == 3  ? "左" : "右",//摆叶位置
-                                        fanState //摆叶状态
+                                        fanState,//摆叶状态,
+                                        
                                     }) 
                                     }) 
                                 }
                                 }