hbuilder 消息推送


var vInfo = plus.push.getClientInfo();
var vInfoData = JSON.stringify(vInfo);
console.log(vInfoData);  获取ClientId  CID

plus.push.addEventListener('receive', function(msg) {
// 透传消息
console.log(JSON.stringify(msg))
}, false);

plus.push.addEventListener('click', function(msg) {
// 通知消息 (可加附加消息,在透传中获取)
console.log(JSON.stringify(msg))
}, false);

posted @ 2020-06-23 11:07  mrt_yy  阅读(952)  评论(0编辑  收藏  举报