Commit eb673129 by 李伟康

commit 埋点

1 parent e9054968
...@@ -28,12 +28,17 @@ export default { ...@@ -28,12 +28,17 @@ export default {
} }
}, },
methods: { methods: {
receptionTrackLeave () { receptionTrackLeave (keyName = 'id') {
if (this.type == 'preview') return if (this.type == 'preview') return
let key = this.id, let key = this[keyName],
value = this.receptionTrack[key] value = this.receptionTrack[key]
value.stayDuration += Number(Date.now() - value.entryTime) value.stayDuration += Number(Date.now() - value.entryTime)
this.$store.dispatch("setReceptionTrack", { key, value }) this.$store.dispatch("setReceptionTrack", { key, value })
if(keyName == 'id' && key == 1) {
let [receptionRef] = this.$refs.media1
receptionRef.previewLeave(receptionRef.currentItem)
}
} }
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -135,6 +135,14 @@ export default { ...@@ -135,6 +135,14 @@ export default {
handler (newval) { handler (newval) {
this.currentItem = null this.currentItem = null
} }
},
show: {
immediate: true,
handler (newval) {
if (newval) {
if (newval) this.changePreView(this.currentItem)
}
}
} }
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!