第一种方式:提示getPushClientId:fail uniPush is not enabled
uni.getPushClientId({
success(res) {
console.log(res);
},
fail(err) {
console.log(err)
}
})
第二种获取方式:提示failed,check appkey or appid
plus.push.getClientInfoAsync((info) => {
let cid = info.clientid;
console.log(cid)
}, err => {
console.log(err);
});