修改关于jpush.receiveNotification的文档,并删除旧有说明

This commit is contained in:
zhangqinghe
2015-06-09 17:31:57 +08:00
parent c420ae20e5
commit 1082fbd8c4
5 changed files with 75 additions and 41 deletions

View File

@@ -54,8 +54,12 @@
}
var onReceiveNotification = function(event){
try{
var alert = window.plugins.jPushPlugin.receiveNotification.alert;
var alert
if(device.platform == "Android"){
alert = window.plugins.jPushPlugin.receiveNotification.alert;
}else{
alert = event.aps.alert;
}
$("#notificationResult").html(alert);
}
@@ -65,9 +69,15 @@
}
var onReceiveMessage = function(event){
try{
var message = window.plugins.jPushPlugin.receiveMessage.message;
var message
if(device.platform == "Android"){
message = window.plugins.jPushPlugin.receiveMessage.message;
}else{
message = event.content;
}
//var extras = window.plugins.jPushPlugin.extras
$("#messageResult").html(message);
}