我是靠谱客的博主 寂寞香菇,最近开发中收集的这篇文章主要介绍vue获取client为0_获取clientid为null,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

自定义基座上面运行正常,但是云打包之后获取clientid为null

hbuilderx版本:2.7.7 -alpha

测试代码如下

//app.vue onLaunch

setTimeout(()=>{

const cid_res = plus.push.getClientInfo();

console.log(cid_res);

// if(cid_res.err){

uni.showToast({

title:'同步'+JSON.stringify(cid_res),

icon:'none'

});

},2000)

setTimeout(()=>{

console.log('aaaaaa');

plus.push.getClientInfoAsync( result => {

uni.showToast({

title:`异步成功${JSON.stringify(result)}`,

icon:'none'

});

}, (error)=>{

uni.showToast({

title:`异步失败${JSON.stringify(error)}`,

icon:'none'

});

});

},5000)

云打包之后结果如下

a360633c87555fa541022b80441842fb.png

0d63c2ffa5cf4783c3aa2c4facb6dd03.png

最后

以上就是寂寞香菇为你收集整理的vue获取client为0_获取clientid为null的全部内容,希望文章能够帮你解决vue获取client为0_获取clientid为null所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(56)

评论列表共有 0 条评论

立即
投稿
返回
顶部