Commit ea067531 by 朱建香

远程开门通知debug

parent ffe01157
......@@ -36,7 +36,7 @@ export default {
"shake_times": 3,
//门锁晃动总时间
"ring_time": 12000,
"remote_opendoor_timeout": 15000,
"remote_opendoor_timeout": 30000,
//二维码失效时间
"qrcode_timeout": 600000,
"remote_timeout": 120,
......
......@@ -134,6 +134,9 @@ function init() {
boolPasswordMinlength: false
},
mounted(){
if(window.iotDebug){
iotDebug.push('start: Debug');
}
//显示loading
uComponents.showLoading(this);
//监听推送
......@@ -1028,6 +1031,12 @@ function setBellRing(self, time){
function setRemoteOpendoor(self, time){
let now = moment(new Date(), "YYYY-MM-DD hh:mm:ss");
time = moment(time, "YYYY-MM-DD hh:mm:ss");
if(window.iotDebug){
iotDebug.push('end: 远程开门'+'设备当前时间'+now.unix()+'通知时间'+time.unix());
}
if (window.iotDebug) {
iotDebug.upload(iot,'远程开门');
}
console.log(now.diff(time,'seconds'));
if(now.diff(time,'seconds') < config.pushMsg_timeout && now.diff(time,'seconds') >= 0 && (self.getRole() == 0)){
self.setValueRemoteOpendoor(true);
......@@ -1151,10 +1160,22 @@ function notifyDataProcessing(self, payload){
function notificationListener(self) {
// 从系统消息中心点击消息启动应用事件
plus.push.addEventListener('click', function (msg) {
if(window.iotDebug){
iotDebug.push('end: 点击通知'+JSON.stringify(msg));
}
if (window.iotDebug) {
iotDebug.upload(iot,'点击通知');
}
pushAction(self, msg);
}, false);
// 应用从推送服务器接收到推送消息事件
plus.push.addEventListener('receive', function (msg) {
if(window.iotDebug){
iotDebug.push('end: 接收通知'+JSON.stringify(msg));
}
if (window.iotDebug) {
iotDebug.upload(iot,'接收通知');
}
}, false);
}
......
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