Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
GeekLearnMathWeapp
Project
Project
Details
Activity
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
frontend
GeekLearnMathWeapp
Commits
9045ab4a
Commit
9045ab4a
authored
Jun 15, 2023
by
hewenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 劫持taro 事件系统 添加skynet埋点
parent
0a183e26
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
2 deletions
+16
-2
chapter.module.scss
src/pages/main/main-underground/chapter.module.scss
+2
-0
index.tsx
src/pages/main/main-underground/scene/index.tsx
+5
-2
skynet.ts
src/utils/skynet.ts
+9
-0
No files found.
src/pages/main/main-underground/chapter.module.scss
View file @
9045ab4a
...
...
@@ -73,6 +73,7 @@
animation-duration
:
1s
;
animation-iteration-count
:
infinite
;
animation-delay
:
0s
;
flex-shrink
:
0
;
}
.guideRight
{
...
...
@@ -87,6 +88,7 @@
.close
{
width
:
48px
;
height
:
48px
;
flex-shrink
:
0
;
}
.dot
{
...
...
src/pages/main/main-underground/scene/index.tsx
View file @
9045ab4a
...
...
@@ -46,8 +46,11 @@ const Scene = (props: SceneProps) => {
if
(
!
domRef
.
current
)
return
createSelectorQuery
()
.
select
(
`#
${
domRef
.
current
.
uid
}
`
)
.
boundingClientRect
().
exec
(([
_rect
])
=>
{
setContainerHeight
(
_rect
.
height
)
.
boundingClientRect
().
exec
(([
rect
])
=>
{
if
(
!
rect
)
{
return
}
setContainerHeight
(
rect
.
height
)
})
})
},
[
props
.
stageList
])
...
...
src/utils/skynet.ts
View file @
9045ab4a
...
...
@@ -3,6 +3,15 @@ import {
}
from
'@geek/skynet-client-wxmini'
import
{
SkynetConfig
}
from
'@/config/skynet'
import
{
TaroElement
}
from
'@tarojs/runtime'
const
dispatchEvent
=
TaroElement
.
prototype
.
dispatchEvent
TaroElement
.
prototype
.
dispatchEvent
=
function
(
event
)
{
// console.log('taro event', event)
return
dispatchEvent
.
call
(
this
,
event
)
}
export
enum
SkynetEvent
{
PageView
=
'PageView'
,
PageLeave
=
'PageLeave'
,
...
...
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