个推回调消息.md 974 B

以下内容为

uni.onPushMessage((res) => {
	console.log("收到推送消息:",res) //监听推送消息
})

收到消息时:

{
    "type": "receive",
    "data": {
        "aps": null,
        "content": "",
        "payload": "",
        "title": "杭律云",
        "type": "receive"
    }
}

用户点击之后收到的消息内容

{
    "type": "click",
    "data": {
        "aps": {
            "alert": {
                "body": "你好,我是小熠",
                "title": "你好,我测试服务端推送消息"
            },
            "badge": 1,
            "content-available": 0,
            "mutable-content": 1,
            "sound": "default",
            "unipush_version": "2.0"
        },
        "content": "你好,我是小熠",
        "payload": {
            "text": "体验一下uni-push2.0"
        },
        "title": "杭律云",
        "type": "click",
        "unipush_version": "2.0"
    }
}