提交 246b7837 编写于 作者: fxy060608's avatar fxy060608

fix(app): getClientInfo => getClientInfoAsync

上级 022dce56
......@@ -4,14 +4,22 @@ uni.invokePushCallback({
});
Promise.resolve().then(() => {
plus.push.setAutoNotification && plus.push.setAutoNotification(false);
const info = plus.push.getClientInfo();
if (info.clientid) {
plus.push.getClientInfoAsync((info) => {
if (info.clientid) {
// @ts-expect-error
uni.invokePushCallback({
type: 'clientId',
cid: info.clientid,
});
}
}, (res) => {
// @ts-expect-error
uni.invokePushCallback({
type: 'clientId',
cid: info.clientid,
cid: '',
errMsg: res.code + ': ' + res.message,
});
}
});
plus.push.addEventListener('click', (result) => {
// @ts-expect-error
uni.invokePushCallback({
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册