Showing
1 changed file
with
15 additions
and
0 deletions
| 1 | +import { DateTimeUtils } from 'wdKit/Index'; | ||
| 2 | +import { TrackingPageBrowse, TrackConstants } from 'wdTracking/Index'; | ||
| 1 | import { AppointmentListUI } from '../mine/appointment/AppointmentListUI' | 3 | import { AppointmentListUI } from '../mine/appointment/AppointmentListUI' |
| 2 | 4 | ||
| 3 | const TAG = "AppointmentListPage" | 5 | const TAG = "AppointmentListPage" |
| @@ -5,6 +7,19 @@ const TAG = "AppointmentListPage" | @@ -5,6 +7,19 @@ const TAG = "AppointmentListPage" | ||
| 5 | @Entry | 7 | @Entry |
| 6 | @Component | 8 | @Component |
| 7 | struct AppointmentListPage { | 9 | struct AppointmentListPage { |
| 10 | + pageShowTime:number = 0; | ||
| 11 | + pageHideTime:number = 0; | ||
| 12 | + | ||
| 13 | + onPageShow() { | ||
| 14 | + this.pageShowTime = DateTimeUtils.getTimeStamp() | ||
| 15 | + } | ||
| 16 | + | ||
| 17 | + onPageHide(): void { | ||
| 18 | + this.pageHideTime = DateTimeUtils.getTimeStamp() | ||
| 19 | + let duration = 0 | ||
| 20 | + duration = Math.floor((this.pageHideTime - this.pageShowTime)/1000) | ||
| 21 | + TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.My_Saved_Live,TrackConstants.PageName.My_Saved_Live,duration) | ||
| 22 | + } | ||
| 8 | 23 | ||
| 9 | build() { | 24 | build() { |
| 10 | Column(){ | 25 | Column(){ |
-
Please register or login to post a comment