// 桌面通知
function notify () {
if (Notification && Notification.permission === 'granted') {
let instance = new Notification(
'title Notification', {
body: 'notification HTML5 test',
icon: 'logo.png'
}
)
}
}
// 授权
function noticeInit () {
if (Notification) {
Notification.requestPermission(function (permission) {})
}
}