Commit 9045ab4a authored by hewenhao's avatar hewenhao

feat: 劫持taro 事件系统 添加skynet埋点

parent 0a183e26
......@@ -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 {
......
......@@ -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])
......
......@@ -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',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment