diff --git a/src/views/secondHandCar/forSale.vue b/src/views/secondHandCar/forSale.vue index e7c99cbc..7e736045 100644 --- a/src/views/secondHandCar/forSale.vue +++ b/src/views/secondHandCar/forSale.vue @@ -145,7 +145,7 @@ export default { let state = document.visibilityState if (state == 'hidden') { // 用户离开了 console.log("用户离开了") - this.getDuration() + await this.getDuration() } }); }, diff --git a/src/views/secondHandCar/wantBuySale.vue b/src/views/secondHandCar/wantBuySale.vue index ffedffd7..43ad258a 100644 --- a/src/views/secondHandCar/wantBuySale.vue +++ b/src/views/secondHandCar/wantBuySale.vue @@ -89,7 +89,7 @@ export default { let state = document.visibilityState if (state == 'hidden') { // 用户离开了 console.log("用户离开了") - this.getDuration() + await this.getDuration() } }); },