Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-api
提交
1c01da79
U
uni-api
项目概览
DCloud
/
uni-api
通知
776
Star
31
Fork
22
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
5
列表
看板
标记
里程碑
合并请求
2
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-api
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
5
Issue
5
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
1c01da79
编写于
1月 02, 2025
作者:
M
mehaotian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: 统计修复App端打包时因uni-push未开通导致无法打包的问题
上级
0a327b04
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
19 addition
and
17 deletion
+19
-17
uni_modules/uni-stat/changelog.md
uni_modules/uni-stat/changelog.md
+2
-0
uni_modules/uni-stat/package.json
uni_modules/uni-stat/package.json
+1
-1
uni_modules/uni-stat/utssdk/common/core/stat.uts
uni_modules/uni-stat/utssdk/common/core/stat.uts
+16
-16
未找到文件。
uni_modules/uni-stat/changelog.md
浏览文件 @
1c01da79
## 1.0.6(2025-01-02)
-
修复 App端打包时因uni-push未开通导致无法打包的问题
## 1.0.5(2024-12-19)
-
修复自定义事件回调不生效的问题
## 1.0.4(2024-12-12)
...
...
uni_modules/uni-stat/package.json
浏览文件 @
1c01da79
{
"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"
,
...
...
uni_modules/uni-stat/utssdk/common/core/stat.uts
浏览文件 @
1c01da79
...
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录