Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
飞
飞鹤小程序
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
FH
飞鹤小程序
Commits
6e63601e
Commit
6e63601e
authored
Jun 17, 2025
by
张九刚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 在 md.js 中新增 sensorLogTake 函数以主动触发埋点,并更新事件对象的注释说明
parent
839fcd3d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
3 deletions
+20
-3
md.js
md.js
+20
-3
No files found.
md.js
View file @
6e63601e
...
...
@@ -36,7 +36,7 @@ const login = (ext) => {
/**
* 传感器埋点
* @param {*} evt 事件对象
* @param {*} evt 事件对象
,通过节点data-log属性配置
*
* xcxClick 有值就是点击事件
* xcxPage 有值就是页面浏览事件
...
...
@@ -74,10 +74,27 @@ const sensorLog = (evt) => {
}
}
/**
* 主动通过配置数据触发埋点
* @param {*} evt
*/
const
sensorLogTake
=
(
logObj
)
=>
{
if
(
!
logObj
){
return
;
}
const
evt
=
{
currentTarget
:
{
dataset
:
{
log
:
logObj
}
}
}
sensorLog
(
evt
);
}
export
default
{
init
,
sensors
,
login
,
sensorLog
sensorLog
,
sensorLogTake
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment