日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

华为消息推送 有透传通道吗_求解在推送用透传消息-使用厂商通道(我用的是基座测试) 用手机测试出现了“clientId离线”问题...

發(fā)布時(shí)間:2023/12/20 编程问答 30 豆豆
生活随笔 收集整理的這篇文章主要介紹了 华为消息推送 有透传通道吗_求解在推送用透传消息-使用厂商通道(我用的是基座测试) 用手机测试出现了“clientId离线”问题... 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

// #ifdef APP-PLUS

// uni.showModal({

// title: '提示',

// content: '您的用戶(hù)在其它的app登錄,如果有問(wèn)題,請(qǐng)修改密碼或重新登錄!',

// cancelText:"修改密碼",

// confirmText:"好的",

// success: function (res) {

// if (res.confirm) {

// console.log('用戶(hù)點(diǎn)擊確定');

// } else if (res.cancel) {

// console.log('用戶(hù)點(diǎn)擊取消');

// }

// }

// });

const clientInfo = plus.push.getClientInfo()

console.log(clientInfo);

console.log(clientInfo.clientid);

//clientid

const _self = this;

const _handlePush_pash= function(message) {

// 通過(guò) vuex 來(lái)同步頁(yè)面的數(shù)據(jù),僅做演示。

// 實(shí)際開(kāi)發(fā)中,這里可能是跳轉(zhuǎn)到某個(gè)頁(yè)面等操作,請(qǐng)根據(jù)自身業(yè)務(wù)需求編寫(xiě)。

console.log(message);

_self.updatePushMessage(message);

console.log(message.payload);

// uni.showModal({

// content:'duixiang1111=='+JSON.stringify(message)+"duixiang111",

// showCancel: false

// });

var message_payload = JSON.parse(message.payload);

// uni.showModal({

// content:'duixiang=='+JSON.stringify(message_payload)+"duixiang",

// showCancel: false

// });

console.log(message_payload);

// var message_payload = JSON.stringify(payload);

//將對(duì)象轉(zhuǎn)為字符串 JSON.stringify(jsObj)

//JSON字符串轉(zhuǎn)為對(duì)象 JSON.parse(str);

console.log(message_payload.titelok);

console.log(message_payload.pagePath);

// uni.showModal({

// content:'tiaozhuang=='+message_payload.pagePath+"tiaozhuang",

// showCancel: false

// });

//這個(gè)很重要 因?yàn)榧虞d要時(shí)間 定時(shí)器的重要性

setTimeout(() => {

//這個(gè) 調(diào)整

uni.navigateTo({

url: message_payload.pagePath

});

},1000);

//end 定時(shí)器 他有緩沖時(shí)間

};

plus.push.addEventListener('click', function(message) {

plus.nativeUI.toast('111push click');

console.log(message);

var message_payloadxxx = JSON.parse(message.payload);

//return;

_handlePush_pash(message);

});

plus.push.addEventListener('receive', function(message) {

plus.nativeUI.toast('push receive');

console.log(message);

// var i=0;

var jsonData = JSON.stringify(message.payload) //字字符串 對(duì)項(xiàng)專(zhuān)字符串

var jsonData1 = JSON.stringify(message) //字字符串 對(duì)項(xiàng)專(zhuān)字符串

//var jsonData=JSON.parse(message.payload) //字字符串 對(duì)項(xiàng)專(zhuān)字符串

//蘋(píng)果解決

if (message.type == 'receive') {

//plus.push.createMessage(message.content,message.payload,message.title);

// plus.push.createMessage(message.content,jsonData,message.title);

// plus.push.createMessage(message.content,jsonData,message.title);

// plus.push.createMessage(message.content,aaa);

plus.push.createMessage(message.title, jsonData); //可以到頁(yè)面

}

// return;

//_handlePush(message);

});

// #endif

總結(jié)

以上是生活随笔為你收集整理的华为消息推送 有透传通道吗_求解在推送用透传消息-使用厂商通道(我用的是基座测试) 用手机测试出现了“clientId离线”问题...的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。