React Native 接收消息 获取内容

QShengW
2018-07-18 09:45 1.4k 0
//接收通知监听
JPushModule.addReceiveNotificationListener((map) => {
      console.log("alertContent: " + map.alertContent);
      console.log("extras: " + map.extras);
})

通知栏目上是有推送的相关信息的 但是 上面2个 console.log() 打印出来的是

alertContent: undefined
extras: [object Object]

为何
然后 我使用JOSN.parse(map.extras) 还报了错

 ExceptionsManager.js:65 Unexpected token o in JSON at position 1

2个回答

热门排序