xzw 4 years ago
parent
commit
ca0cdb2d26
1 changed files with 4 additions and 3 deletions
  1. 4 3
      js/main_2020_show.js

+ 4 - 3
js/main_2020_show.js

@@ -24,17 +24,18 @@ $("#hotPannel input.mui-switch").on('change',(e)=>{//灯
 
 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', hotNeedUpdatePannel.temperature - 1 + '')// temperature 
-deviceBtnBind($("#hotPannel .ac-con  .minbtn .ac-btn").eq(1),  '05', 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  .ac-close"),  '02', '0')// close