Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Velpro187
uni-app
提交
ea46ae7f
U
uni-app
项目概览
Velpro187
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
ea46ae7f
编写于
8月 24, 2022
作者:
M
mehaotian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fest(stat): 新增 采集项- uniPushClientID 配置
上级
bab5dcaf
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
71 addition
and
15 deletion
+71
-15
packages/uni-stat/dist/uni-cloud-stat.cjs.js
packages/uni-stat/dist/uni-cloud-stat.cjs.js
+14
-3
packages/uni-stat/dist/uni-cloud-stat.es.js
packages/uni-stat/dist/uni-cloud-stat.es.js
+14
-3
packages/uni-stat/dist/uni-stat.cjs.js
packages/uni-stat/dist/uni-stat.cjs.js
+14
-3
packages/uni-stat/dist/uni-stat.es.js
packages/uni-stat/dist/uni-stat.es.js
+14
-3
packages/uni-stat/src/core/stat.js
packages/uni-stat/src/core/stat.js
+3
-1
packages/uni-stat/src/utils/pageInfo.js
packages/uni-stat/src/utils/pageInfo.js
+12
-2
未找到文件。
packages/uni-stat/dist/uni-cloud-stat.cjs.js
浏览文件 @
ea46ae7f
...
...
@@ -474,7 +474,6 @@ const is_debug = debug;
* @param {*} data
*/
const
log
=
(
data
,
type
)
=>
{
let
msg_type
=
''
;
switch
(
data
.
lt
)
{
case
'
1
'
:
...
...
@@ -500,7 +499,7 @@ const log = (data, type) => {
// #ifdef APP
// 在 app 中,日志转为 字符串
if
(
typeof
data
===
'
object
'
)
{
if
(
typeof
data
===
'
object
'
)
{
data
=
JSON
.
stringify
(
data
);
}
// #endif
...
...
@@ -532,6 +531,17 @@ const get_report_Interval = (defaultTime) => {
// 如果不是整数,则默认为上报间隔时间
if
(
!
reg
.
test
(
time
))
return
defaultTime
return
Number
(
time
)
};
/**
* 获取隐私协议配置
*/
const
is_push_clientid
=
()
=>
{
if
(
uniStatisticsConfig
.
collectItems
)
{
const
ClientID
=
uniStatisticsConfig
.
collectItems
.
uniPushClientID
;
return
typeof
ClientID
===
'
boolean
'
?
ClientID
:
false
}
return
false
};
const
appid
=
process
.
env
.
UNI_APP_ID
;
// 做应用隔离
...
...
@@ -1304,7 +1314,8 @@ class Stat extends Report {
* 获取推送id
*/
pushEvent
(
options
)
{
if
(
uni
.
getPushClientId
)
{
const
ClientID
=
is_push_clientid
();
if
(
uni
.
getPushClientId
&&
ClientID
)
{
uni
.
getPushClientId
({
success
:
(
res
)
=>
{
const
cid
=
res
.
cid
||
false
;
...
...
packages/uni-stat/dist/uni-cloud-stat.es.js
浏览文件 @
ea46ae7f
...
...
@@ -472,7 +472,6 @@ const is_debug = debug;
* @param {*} data
*/
const
log
=
(
data
,
type
)
=>
{
let
msg_type
=
''
;
switch
(
data
.
lt
)
{
case
'
1
'
:
...
...
@@ -498,7 +497,7 @@ const log = (data, type) => {
// #ifdef APP
// 在 app 中,日志转为 字符串
if
(
typeof
data
===
'
object
'
)
{
if
(
typeof
data
===
'
object
'
)
{
data
=
JSON
.
stringify
(
data
);
}
// #endif
...
...
@@ -530,6 +529,17 @@ const get_report_Interval = (defaultTime) => {
// 如果不是整数,则默认为上报间隔时间
if
(
!
reg
.
test
(
time
))
return
defaultTime
return
Number
(
time
)
};
/**
* 获取隐私协议配置
*/
const
is_push_clientid
=
()
=>
{
if
(
uniStatisticsConfig
.
collectItems
)
{
const
ClientID
=
uniStatisticsConfig
.
collectItems
.
uniPushClientID
;
return
typeof
ClientID
===
'
boolean
'
?
ClientID
:
false
}
return
false
};
const
appid
=
process
.
env
.
UNI_APP_ID
;
// 做应用隔离
...
...
@@ -1302,7 +1312,8 @@ class Stat extends Report {
* 获取推送id
*/
pushEvent
(
options
)
{
if
(
uni
.
getPushClientId
)
{
const
ClientID
=
is_push_clientid
();
if
(
uni
.
getPushClientId
&&
ClientID
)
{
uni
.
getPushClientId
({
success
:
(
res
)
=>
{
const
cid
=
res
.
cid
||
false
;
...
...
packages/uni-stat/dist/uni-stat.cjs.js
浏览文件 @
ea46ae7f
...
...
@@ -453,7 +453,6 @@ const is_debug = debug;
* @param {*} data
*/
const
log
=
(
data
,
type
)
=>
{
let
msg_type
=
''
;
switch
(
data
.
lt
)
{
case
'
1
'
:
...
...
@@ -479,7 +478,7 @@ const log = (data, type) => {
// #ifdef APP
// 在 app 中,日志转为 字符串
if
(
typeof
data
===
'
object
'
)
{
if
(
typeof
data
===
'
object
'
)
{
data
=
JSON
.
stringify
(
data
);
}
// #endif
...
...
@@ -511,6 +510,17 @@ const get_report_Interval = (defaultTime) => {
// 如果不是整数,则默认为上报间隔时间
if
(
!
reg
.
test
(
time
))
return
defaultTime
return
Number
(
time
)
};
/**
* 获取隐私协议配置
*/
const
is_push_clientid
=
()
=>
{
if
(
uniStatisticsConfig
.
collectItems
)
{
const
ClientID
=
uniStatisticsConfig
.
collectItems
.
uniPushClientID
;
return
typeof
ClientID
===
'
boolean
'
?
ClientID
:
false
}
return
false
};
const
appid
=
process
.
env
.
UNI_APP_ID
;
// 做应用隔离
...
...
@@ -1268,7 +1278,8 @@ class Stat extends Report {
* 获取推送id
*/
pushEvent
(
options
)
{
if
(
uni
.
getPushClientId
)
{
const
ClientID
=
is_push_clientid
();
if
(
uni
.
getPushClientId
&&
ClientID
)
{
uni
.
getPushClientId
({
success
:
(
res
)
=>
{
const
cid
=
res
.
cid
||
false
;
...
...
packages/uni-stat/dist/uni-stat.es.js
浏览文件 @
ea46ae7f
...
...
@@ -451,7 +451,6 @@ const is_debug = debug;
* @param {*} data
*/
const
log
=
(
data
,
type
)
=>
{
let
msg_type
=
''
;
switch
(
data
.
lt
)
{
case
'
1
'
:
...
...
@@ -477,7 +476,7 @@ const log = (data, type) => {
// #ifdef APP
// 在 app 中,日志转为 字符串
if
(
typeof
data
===
'
object
'
)
{
if
(
typeof
data
===
'
object
'
)
{
data
=
JSON
.
stringify
(
data
);
}
// #endif
...
...
@@ -509,6 +508,17 @@ const get_report_Interval = (defaultTime) => {
// 如果不是整数,则默认为上报间隔时间
if
(
!
reg
.
test
(
time
))
return
defaultTime
return
Number
(
time
)
};
/**
* 获取隐私协议配置
*/
const
is_push_clientid
=
()
=>
{
if
(
uniStatisticsConfig
.
collectItems
)
{
const
ClientID
=
uniStatisticsConfig
.
collectItems
.
uniPushClientID
;
return
typeof
ClientID
===
'
boolean
'
?
ClientID
:
false
}
return
false
};
const
appid
=
process
.
env
.
UNI_APP_ID
;
// 做应用隔离
...
...
@@ -1266,7 +1276,8 @@ class Stat extends Report {
* 获取推送id
*/
pushEvent
(
options
)
{
if
(
uni
.
getPushClientId
)
{
const
ClientID
=
is_push_clientid
();
if
(
uni
.
getPushClientId
&&
ClientID
)
{
uni
.
getPushClientId
({
success
:
(
res
)
=>
{
const
cid
=
res
.
cid
||
false
;
...
...
packages/uni-stat/src/core/stat.js
浏览文件 @
ea46ae7f
...
...
@@ -6,6 +6,7 @@ import {
get_platform_name
,
get_space
,
is_debug
,
is_push_clientid
}
from
'
../utils/pageInfo.js
'
import
{
dbSet
}
from
'
../utils/db.js
'
class
Stat
extends
Report
{
...
...
@@ -51,7 +52,8 @@ class Stat extends Report {
* 获取推送id
*/
pushEvent
(
options
)
{
if
(
uni
.
getPushClientId
)
{
const
ClientID
=
is_push_clientid
()
if
(
uni
.
getPushClientId
&&
ClientID
)
{
uni
.
getPushClientId
({
success
:
(
res
)
=>
{
const
cid
=
res
.
cid
||
false
...
...
packages/uni-stat/src/utils/pageInfo.js
浏览文件 @
ea46ae7f
...
...
@@ -481,7 +481,6 @@ export const is_debug = debug
* @param {*} data
*/
export
const
log
=
(
data
,
type
)
=>
{
let
msg_type
=
''
switch
(
data
.
lt
)
{
case
'
1
'
:
...
...
@@ -507,7 +506,7 @@ export const log = (data, type) => {
// #ifdef APP
// 在 app 中,日志转为 字符串
if
(
typeof
data
===
'
object
'
)
{
if
(
typeof
data
===
'
object
'
)
{
data
=
JSON
.
stringify
(
data
)
}
// #endif
...
...
@@ -540,3 +539,14 @@ export const get_report_Interval = (defaultTime) => {
if
(
!
reg
.
test
(
time
))
return
defaultTime
return
Number
(
time
)
}
/**
* 获取隐私协议配置
*/
export
const
is_push_clientid
=
()
=>
{
if
(
uniStatisticsConfig
.
collectItems
)
{
const
ClientID
=
uniStatisticsConfig
.
collectItems
.
uniPushClientID
return
typeof
ClientID
===
'
boolean
'
?
ClientID
:
false
}
return
false
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录