首席劝退师
首席劝退师
  • 发布:2018-10-25 11:22
  • 更新:2018-10-25 11:22
  • 阅读:908

【报Bug】ios个推在线推送receive无法监听推送平台发布的消息

分类:HTML5+
         plus.push.addEventListener("click", function(msg) {  

// alert(msg)
// alert("信息="+msg.title);
// alert("信息="+msg.content);
// plus.runtime.openURL(msg);
pushGetRun();
number--;
}, false);
plus.push.addEventListener("receive", function(msg) {
// var data = JSON.parse(msg.payload);
// alert("数据="+ msg.title);
// alert("数据="+ msg.content);
// alert("数据="+ data);
if(plus.os.name != "iOS"){
if(msg.aps) { // Apple APNS message
console.log("接收到在线APNS消息:");
} else {
console.log("接收到在线透传消息:" + msg.content );
}
console.log(msg.content);
console.log(msg.payload);
if(msg.payload == "true"){
plus.push.createMessage(msg.content, "LocalMSG", {
title: msg.title,
cover: false
});
}

                     }else{  
                             plus.push.createMessage(msg.content, "LocalMSG", {  
                                title: msg.title,  
                                cover: false  
                      });                         
                 }  

                }, false);          
2018-10-25 11:22 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复