提交 33e94e05 编写于 作者: fxy060608's avatar fxy060608

fix(app): getClientInfo => getClientInfoAsync

上级 21897213
......@@ -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({
......
......@@ -4,14 +4,26 @@ uni.invokePushCallback({
})
Promise.resolve().then(() => {
plus.push.setAutoNotification && plus.push.setAutoNotification(false)
const info = plus.push.getClientInfo()
if (info.clientid) {
// @ts-expect-error
uni.invokePushCallback({
type: 'clientId',
cid: 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: '',
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.
先完成此消息的编辑!
想要评论请 注册