mirror of
https://github.com/jpush/jpush-phonegap-plugin.git
synced 2025-01-31 22:42:51 +08:00
fix jpush.receiveNotification in document
This commit is contained in:
parent
d92723301e
commit
e78d5bd544
@ -528,11 +528,11 @@ iOS
|
|||||||
|
|
||||||
- 在你需要接收通知的的js文件中加入:
|
- 在你需要接收通知的的js文件中加入:
|
||||||
|
|
||||||
document.addEventListener("jpush.openNotification", onOpenNotification, false);
|
document.addEventListener("jpush.receiveNotification", onNotification, false);
|
||||||
|
|
||||||
- onOpenNotification需要这样写:
|
- onOpenNotification需要这样写:
|
||||||
|
|
||||||
var onOpenNotification = function(event){
|
var onNotification = function(event){
|
||||||
try{
|
try{
|
||||||
var alert = event.alert;
|
var alert = event.alert;
|
||||||
var extras = event.extras;
|
var extras = event.extras;
|
||||||
|
Loading…
Reference in New Issue
Block a user