Notification消息提醒
if (window.Notification) {
console.log(Notification.permission);
if (Notification.permission === 'granted') {
var notification = new Notification('标题', { body: "内容可以自己随便定义" });
notification.onclick = function (e) {
alert("点击了我")//可以点击打开一个网址
}
} else {
console.log('sss');
Notification.requestPermission();//设置允许通知
}
}