提交 1c01da79 编写于 作者: M mehaotian

fix: 统计修复App端打包时因uni-push未开通导致无法打包的问题

上级 0a327b04
## 1.0.6(2025-01-02)
- 修复 App端打包时因uni-push未开通导致无法打包的问题
## 1.0.5(2024-12-19)
- 修复自定义事件回调不生效的问题
## 1.0.4(2024-12-12)
......
{
"id": "uni-stat",
"displayName": "uni统计 for uni-app x",
"version": "1.0.5",
"version": "1.0.6",
"description": "uni统计的uni-app x 版本",
"keywords": [
"uni-stat",
......
......@@ -160,21 +160,21 @@ export class Stat {
/**
* 获取推送ID
*/
pushEvent(options : any) {
// TODO 具体实现
const ClientID = is_push_clientid()
if (ClientID) {
uni.getPushClientId({
success: (res) => {
const cid = res.cid
// 只有获取到才会上传
// if (cid != null) {
this.report.sendPushRequest(options, cid)
// }
},
} as GetPushClientIdOptions)
}
}
// pushEvent(options : any) {
// // TODO uni x 暂不支持,如需要开启,请放开注释
// const ClientID = is_push_clientid()
// if (ClientID) {
// uni.getPushClientId({
// success: (res) => {
// const cid = res.cid
// // 只有获取到才会上传
// // if (cid != null) {
// this.report.sendPushRequest(options, cid)
// // }
// },
// } as GetPushClientIdOptions)
// }
// }
/**
* 注册事件
......@@ -190,7 +190,7 @@ export class Stat {
case StatType.LifeCycleLaunch:
// 使用非空断言,options在这里肯定非空
this.report.launch(options!)
this.pushEvent(options)
// this.pushEvent(options)
break
case StatType.LifeCycleAppShow:
// TODO 目前只兼容 web 和 app ,小程序等平台需要调用 api onAppHide
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册