Commit 705ad9a5 by zhangzhen

细节优化

parent 9caf358d
......@@ -127,6 +127,9 @@ import moment from "@/common/moment";
cleanStatusEnum:{},
switchDoor:true,
switchEl:true,
deviceTime:{
}
};
},
filters:{
......@@ -217,6 +220,15 @@ import moment from "@/common/moment";
this.$forceUpdate();
},
onDeviceRun(opType,devId){
let that = this;
if(this.deviceTime[devId]){
uni.showToast({
icon:"none",
title:"操作频繁,请稍微再试"
})
return
}
this.deviceTime[devId] = true;
uni.showLoading({
title:"请求中"
})
......@@ -230,6 +242,13 @@ import moment from "@/common/moment";
icon:"success",
title:"操作成功"
})
return ((id)=>{
setTimeout(()=>{
that.deviceTime[id] = false;
},5000)
})(devId)
}
})
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment