From 030417ba9cedcda4bc71663701a5b4b01bd06ffd Mon Sep 17 00:00:00 2001 From: zhoulinf <2507241354@qq.com> Date: Thu, 26 Mar 2026 14:34:41 +0800 Subject: [PATCH] =?UTF-8?q?CRM=5F26-03-31#story#8372,=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=95=86KPI=E7=9C=8B=E6=9D=BF=E8=AE=BE=E7=BD=AE=E5=9F=8B?= =?UTF-8?q?=E7=82=B9=E5=8F=8A=E6=94=AF=E6=8C=81=E6=95=B0=E6=8D=AE=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E9=9C=80=E6=B1=82--=E4=B8=AD=E5=BF=83=E7=BB=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/kpi/kpiIndex.vue | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) 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() {