Commit 2262f557 by luyt

fix;调整触发离开埋点事件

1 parent 2d20a8ce
...@@ -38,10 +38,11 @@ export default { ...@@ -38,10 +38,11 @@ export default {
}, },
mounted() { mounted() {
this.openListener() this.openListener()
}, window.addEventListener('pagehide', () => {
beforeDestroy() { this.leave()
this.leave() this.closeListener()
this.closeListener() // console.log('页面要关闭了')
})
}, },
methods: { methods: {
...@@ -60,6 +61,7 @@ export default { ...@@ -60,6 +61,7 @@ export default {
}, },
//离开事件 //离开事件
leave() { leave() {
// console.log('离开时间')
this.trackFn('leaveReportTrack', 5) this.trackFn('leaveReportTrack', 5)
}, },
trackFn(name, actionType) { trackFn(name, actionType) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!