肩膀教育
肩膀教育
  • 发布:2020-12-17 17:41
  • 更新:2020-12-17 20:19
  • 阅读:1419

uniPush 离线通知点击消息无法唤醒APP

分类:uni-app
// #ifdef APP-PLUS  
            let timer   
            // 监听点击消息事件  
            plus.push.addEventListener('click',function(msg){  
                clearTimeout(timer)  
                let payload = msg.payload  
                console.log(msg)  
                timer = setTimeout(function(){  
                    if(payload){  
                        uni.navigateTo({  
                            url: '/pages/news/news?payload=' + JSON.stringify(payload)  
                        })  
                    }  
                },1500)  
            })  
            // 监听在线消息事件  
            plus.push.addEventListener('receive',function(msg){  
                console.log(msg)  
                if('LocalMSG' == msg.payload){}else{  
                    if(msg.type == 'receive'){  
                        var options = {cover:false,title:msg.title}  
                        plus.push.createMessage(msg.content,msg.payload,options)  
                    }  
                }  
            })  
            // #endif

代码如上,消息厂商离线推送,点击消息栏目无法唤醒APP

2020-12-17 17:41 负责人:无 分享
已邀请:

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