670加入用户确认收到消息
This commit is contained in:
@ -309,6 +309,8 @@
|
||||
data() {
|
||||
return {
|
||||
Status: {
|
||||
msgOkIntval:null,//紧急通知等待的时间
|
||||
msgOkTime:null,//
|
||||
pageHide: false,
|
||||
apiType: "listA",
|
||||
navbar: {
|
||||
@ -465,6 +467,8 @@
|
||||
onUnload() {
|
||||
console.log("页面卸载,释放资源");
|
||||
let statusTopic = `A/${this.formData.imei?this.formData.imei:this.device.deviceImei}`;
|
||||
clearInterval(these.Status.staticWarn.inteval);
|
||||
clearInterval(this.Status.msgOkIntval);
|
||||
ble.removeAllCallback(pagePath);
|
||||
if (mqttClient) {
|
||||
mqttClient.unsubscribe(statusTopic);
|
||||
@ -863,10 +867,22 @@
|
||||
// console.log("收到文本回复", payload);
|
||||
// // this.SendTxtMQ(json);
|
||||
// }
|
||||
// else if (keys.indexOf('sta_BreakNews') > -1) { //紧急通知
|
||||
// console.log("收到紧急消息回复", payload);
|
||||
// // this.sendUrgentMQ(json);
|
||||
// }
|
||||
if (keys.indexOf('sta_BreakNews') > -1) { //紧急通知
|
||||
if(json.sta_BreakNews==='I get it')// && this.Status.msgOkTime && this.Status.msgOkIntval){
|
||||
{
|
||||
these.showPop({
|
||||
showPop: true,
|
||||
message: "用户已确认收到紧急通知",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadSuccess.png"
|
||||
});
|
||||
|
||||
// this.Status.msgOkTime=null
|
||||
// clearInterval(this.Status.msgOkIntval);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
// else {
|
||||
// console.log("收到不能处理的数据", payload);
|
||||
// }
|
||||
@ -2498,7 +2514,7 @@
|
||||
buttonBgColor: '#BBE600',
|
||||
buttonTextColor: '#232323DE',
|
||||
iconUrl: '/static/images/6155/DeviceDetail/sendSucc.png',
|
||||
message: '发送成功',
|
||||
message: '发送成功,待用户确认',
|
||||
buttonText: '确定',
|
||||
clickEvt: 'SendUsr',
|
||||
visiblePrompt: false,
|
||||
@ -2506,6 +2522,20 @@
|
||||
modelValue: '',
|
||||
visibleClose: true
|
||||
});
|
||||
|
||||
// clearInterval(this.Status.msgOkIntval);
|
||||
|
||||
// this.Status.msgOkTime=0;
|
||||
// this.Status.msgOkIntval=setInterval(()=>{
|
||||
// this.Status.msgOkTime++;
|
||||
// if(this.Status.msgOkTime>180){
|
||||
// this.Status.msgOkTime=null
|
||||
// clearInterval(this.Status.msgOkIntval);
|
||||
// this.Status.msgOkIntval=null;
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
} else {
|
||||
these.showPop({
|
||||
message: res.msg,
|
||||
|
||||
Reference in New Issue
Block a user