zhaojs
2023-07-07 55803b1a7b478aade9b6e59ca6675777375e2a92
uniapp/App.vue
@@ -13,7 +13,8 @@
      onLaunch: function() {
         // #ifdef APP-PLUS
         //推送开始
         /* var info = plus.push.getClientInfo()
         var info = plus.push.getClientInfo()
         console.log(info);
         // 获取当前设备的客户端id,传给后台,实现指定用户
         info && uni.setStorageSync('clientInfo', info)
         // 使用5+App的方式进行监听消息推送
@@ -64,7 +65,8 @@
               if (msg.type == "receive") {
                  //创建本地消息,发送的本地消息也会被receive方法接收到,但没有type属性,且aps是null  
                  plus.push.createMessage(msg.content, JSON.stringify(msg), {
                     title: messageTitle
                     title: messageTitle,
                     //icon:'/static/images/app/pushlogo.png'
                  });
               }
            } else { // Android
@@ -79,7 +81,7 @@
         //消息推送结束
         plus.push.addEventListener('click', res => {
            console.log(res);
         }); */
         });
         APPUpdate();
         // #endif
         this.getAppInfo();