Commit 9045ab4a authored by hewenhao's avatar hewenhao

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

parent 0a183e26
...@@ -73,6 +73,7 @@ ...@@ -73,6 +73,7 @@
animation-duration: 1s; animation-duration: 1s;
animation-iteration-count: infinite; animation-iteration-count: infinite;
animation-delay: 0s; animation-delay: 0s;
flex-shrink: 0;
} }
.guideRight { .guideRight {
...@@ -87,6 +88,7 @@ ...@@ -87,6 +88,7 @@
.close { .close {
width: 48px; width: 48px;
height: 48px; height: 48px;
flex-shrink: 0;
} }
.dot { .dot {
......
...@@ -46,8 +46,11 @@ const Scene = (props: SceneProps) => { ...@@ -46,8 +46,11 @@ const Scene = (props: SceneProps) => {
if (!domRef.current) return if (!domRef.current) return
createSelectorQuery() createSelectorQuery()
.select(`#${domRef.current.uid}`) .select(`#${domRef.current.uid}`)
.boundingClientRect().exec(([_rect]) => { .boundingClientRect().exec(([rect]) => {
setContainerHeight(_rect.height) if (!rect) {
return
}
setContainerHeight(rect.height)
}) })
}) })
}, [props.stageList]) }, [props.stageList])
......
...@@ -3,6 +3,15 @@ import { ...@@ -3,6 +3,15 @@ import {
} from '@geek/skynet-client-wxmini' } from '@geek/skynet-client-wxmini'
import { SkynetConfig } from '@/config/skynet' 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 { export enum SkynetEvent {
PageView = 'PageView', PageView = 'PageView',
PageLeave = 'PageLeave', 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