CRM_26-03-31#story#8372,服务商KPI看板设置埋点及支持数据导出需求--中心组
This commit is contained in:
@@ -350,24 +350,26 @@ export default {
|
||||
await this.initDate();
|
||||
await this.selectSupplierNameHandle();
|
||||
await this.getUserInfo();
|
||||
this.enterTime = dayjs().format('YYYY-MM-DD HH:mm:ss');
|
||||
},
|
||||
beforeMount() {
|
||||
console.log('beforeMount')
|
||||
},
|
||||
destroyed() {
|
||||
console.log('beforeDestroy')
|
||||
if( this.source == 'App' ) {
|
||||
console.log('beforeDestroy---AAAA')
|
||||
this.setLogHandler({
|
||||
supplierId: this.currentSupplierId, // 服务商 id
|
||||
userId: this.userId, // userId
|
||||
source: '服务商KPI',
|
||||
event: this.source, // 区分 App 还是 system
|
||||
openTime: this.enterTime, // log 时间,其中 阅读时长是由 enter 和 leave 的时间计算而来
|
||||
leaveTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||
});
|
||||
}
|
||||
document.addEventListener('visibilitychange', async ( ) => {
|
||||
let state = document.visibilityState
|
||||
if (state == 'hidden') { // 用户离开了
|
||||
if( this.source == 'App' ) {
|
||||
this.setLogHandler({
|
||||
supplierId: this.currentSupplierId, // 服务商 id
|
||||
userId: this.userId, // userId
|
||||
source: '服务商KPI',
|
||||
event: this.source, // 区分 App 还是 system
|
||||
openTime: this.enterTime, // log 时间,其中 阅读时长是由 enter 和 leave 的时间计算而来
|
||||
leaveTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||
});
|
||||
}
|
||||
}
|
||||
if (state == 'visible') {
|
||||
this.enterTime = dayjs().format('YYYY-MM-DD HH:mm:ss');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
methods: {
|
||||
async getUserInfo() {
|
||||
|
||||
Reference in New Issue
Block a user