|
@@ -32,6 +32,19 @@ function screenShot () {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+// 消息通知
|
|
|
|
|
+function notifiction (title, options) {
|
|
|
|
|
+ const WebNotification = window.Notification || window.mozNotification || window.webkitNotification
|
|
|
|
|
+ const isTrue = WebNotification.requestPermission(result => {
|
|
|
|
|
+ return (result === 'granted') // granted(允许) || denied(拒绝)
|
|
|
|
|
+ })
|
|
|
|
|
+ const noti = new WebNotification(title, options)
|
|
|
|
|
+ noti.onclick=()=>{
|
|
|
|
|
+ console.log('关闭')
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
// 创建loading 窗口
|
|
// 创建loading 窗口
|
|
|
const showLoading = () => {
|
|
const showLoading = () => {
|
|
|
loadingWin = new BrowserWindow({
|
|
loadingWin = new BrowserWindow({
|