2***@qq.com
2***@qq.com
  • 发布:2020-05-24 17:07
  • 更新:2020-05-27 15:08
  • 阅读:1860

获取clientid为null

分类:uni-app

自定义基座上面运行正常,但是云打包之后获取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)  

云打包之后结果如下

2020-05-24 17:07 负责人:无 分享
已邀请:
DCloud_Android_ST

DCloud_Android_ST

说明你的配置信息错误 查看AppId、AppKey、MasterSecret参数 与你云打包的签名包名是否一致。

2***@qq.com

2***@qq.com (作者) - 前端的力量


我勾选了的

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