diff --git a/src/views/kpi/kpiIndex.vue b/src/views/kpi/kpiIndex.vue index 5e1ca754..4959df69 100644 --- a/src/views/kpi/kpiIndex.vue +++ b/src/views/kpi/kpiIndex.vue @@ -352,15 +352,17 @@ export default { await this.getUserInfo(); this.enterTime = dayjs().format('YYYY-MM-DD HH:mm:ss'); }, - async beforeDestroy() { - await 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'), - }); + beforeDestroy() { + 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'), + }); + } }, methods: { async getUserInfo() {