|
@@ -21,6 +21,7 @@ $("#hotPannel input.mui-switch").on('change',(e)=>{//灯
|
|
|
})
|
|
|
})
|
|
|
var getAjax = function(url, success, errorString){
|
|
|
+ $(".waiting").addClass('showloading')
|
|
|
$.ajax({//获取设备状态
|
|
|
method: "GET",
|
|
|
headers: {
|
|
@@ -31,9 +32,11 @@ var getAjax = function(url, success, errorString){
|
|
|
url: url,
|
|
|
success: (data)=> {
|
|
|
success(data)
|
|
|
+ $(".waiting").removeClass('showloading')
|
|
|
},
|
|
|
- error:(e)=>{
|
|
|
+ error:(e)=>{
|
|
|
alert(errorString)
|
|
|
+ $(".waiting").removeClass('showloading')
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -15600,8 +15603,9 @@ window.Modernizr = function(n, e, t) {
|
|
|
|
|
|
if(hardware && hardware.id!=void 0){
|
|
|
//获取设备状态
|
|
|
+ $(".waiting").addClass('showloading')
|
|
|
getDeviceInfo(hardware.id, (data)=>{
|
|
|
- hot.setDeviceStatus(data[0].status == 2)
|
|
|
+ this.setDeviceStatus(data[0].status == 2)
|
|
|
|
|
|
if(this.deviceStatus){//在线
|
|
|
|
|
@@ -15790,9 +15794,10 @@ window.Modernizr = function(n, e, t) {
|
|
|
|
|
|
}
|
|
|
}, '获取数据失败')
|
|
|
-
|
|
|
+
|
|
|
|
|
|
}else{
|
|
|
+ $(".waiting").removeClass('showloading')
|
|
|
alert('该设备不在线')
|
|
|
}
|
|
|
|