Commit 2262f557 by luyt

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

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