二手车交易,用户离开记录浏览量
This commit is contained in:
@ -141,6 +141,12 @@ export default {
|
|||||||
}
|
}
|
||||||
this.imgSrcList.unshift(res?.data?.vehicleAnglePhoto)
|
this.imgSrcList.unshift(res?.data?.vehicleAnglePhoto)
|
||||||
}
|
}
|
||||||
|
document.addEventListener('visibilitychange', async ( ) => {
|
||||||
|
let state = document.visibilityState
|
||||||
|
if (state == 'hidden') { // 用户离开了
|
||||||
|
this.getDuration()
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
destroyed() {
|
destroyed() {
|
||||||
this.getDuration()
|
this.getDuration()
|
||||||
|
@ -85,6 +85,12 @@ export default {
|
|||||||
})
|
})
|
||||||
this.detailInfo = res?.data
|
this.detailInfo = res?.data
|
||||||
}
|
}
|
||||||
|
document.addEventListener('visibilitychange', async ( ) => {
|
||||||
|
let state = document.visibilityState
|
||||||
|
if (state == 'hidden') { // 用户离开了
|
||||||
|
this.getDuration()
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
destroyed() {
|
destroyed() {
|
||||||
this.getDuration()
|
this.getDuration()
|
||||||
|
Reference in New Issue
Block a user