update demo add receiveLocalNotification Event

This commit is contained in:
huangminlinux 2017-12-12 14:26:55 +08:00
parent 9c103753e6
commit 9ea65add1f

View File

@ -55,6 +55,16 @@ export class HomePage {
}
alert('Open notification: ' + content);
}, false);
document.addEventListener('jpush.receiveLocalNotification', (event: any) => {
// iOS(*,9) Only , iOS(10,*) 将在 jpush.openNotification 和 jpush.receiveNotification 中触发。
var content;
if (this.devicePlatform == 'Android') {
} else {
content = event.content;
}
alert('receive local notification: ' + JSON.stringify(event));
}, false);
}
getRegistrationID() {