md
This commit is contained in:
parent
2ee641b462
commit
99e98146c1
@ -91,6 +91,8 @@ export default {
|
|||||||
alertList:[],
|
alertList:[],
|
||||||
noReadNoticeCount:0,
|
noReadNoticeCount:0,
|
||||||
noticeList: [],
|
noticeList: [],
|
||||||
|
// 剔除重复消息
|
||||||
|
filterMap:new Map(),
|
||||||
|
|
||||||
xdNoticSdk:null,
|
xdNoticSdk:null,
|
||||||
|
|
||||||
@ -160,12 +162,20 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.playTone();
|
|
||||||
|
|
||||||
|
// this.playTone();
|
||||||
|
|
||||||
var messageBody = evt.title;
|
var messageBody = evt.title;
|
||||||
let noticeId= evt.noticeId;
|
let noticeId= evt.noticeId;
|
||||||
// Notification.closeAll();
|
|
||||||
|
|
||||||
|
// 如果有重复消息,则过滤
|
||||||
|
if(this.filterMap.has(messageBody)) { // 如果有该key值
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
this.filterMap.set(messageBody, true);
|
||||||
|
|
||||||
|
// Notification.closeAll();
|
||||||
// this.speech.speak({ text: messageBody }).then(() => {
|
// this.speech.speak({ text: messageBody }).then(() => {
|
||||||
// console.log("读取成功");
|
// console.log("读取成功");
|
||||||
// });
|
// });
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user