16:07:31.280 11:13 Property 'getPushClientId' does not exist on type 'Uni'.
16:07:31.288 9 | onLaunch() {
16:07:31.294 10 | // uni-app客户端获取push客户端标记
16:07:31.299 > 11 | uni.getPushClientId({
16:07:31.302 | ^
16:07:31.305 12 | success: (res) => {
16:07:31.309 13 | let push_clientid = res.cid
16:07:31.313 14 | console.log('客户端推送标识cid:',push_clientid)
16:07:31.317 ERROR in D:/workspace/b2022/yunBangBang/front/yunBangBang56-uni/src/App.vue(21,13):
16:07:31.320 21:13 Property 'onPushMessage' does not exist on type 'Uni'. Did you mean 'onHCEMessage'?
16:07:31.324 19 | });
16:07:31.328 20 |
16:07:31.332 > 21 | uni.onPushMessage((res) => {
16:07:31.336 | ^
16:07:31.340 22 | console.log("收到推送消息:",res) //监听推送消息
16:07:31.343 23 | });
16:07:31.347 24 |
1***@qq.com
- 发布:2023-09-28 16:26
- 更新:2023-10-08 16:54
- 阅读:408
charlence002
我这边升级到Hbuilder 3.9.6,遇到给贴主一样的问题;应该指的是ts报的uni.onPushMessage 没有这个类型声明
2023-11-22 17:27