Showing
1 changed file
with
11 additions
and
0 deletions
| @@ -10,6 +10,7 @@ import {InterestsHobbiesModel} from '../../../../../../../products/phone/src/mai | @@ -10,6 +10,7 @@ import {InterestsHobbiesModel} from '../../../../../../../products/phone/src/mai | ||
| 10 | import HuaweiAuth from '../../utils/HuaweiAuth' | 10 | import HuaweiAuth from '../../utils/HuaweiAuth' |
| 11 | import { loginComponentManager, LoginWithHuaweiIDButton } from '@hms.core.account.LoginComponent' | 11 | import { loginComponentManager, LoginWithHuaweiIDButton } from '@hms.core.account.LoginComponent' |
| 12 | import { BusinessError } from '@ohos.base' | 12 | import { BusinessError } from '@ohos.base' |
| 13 | +import { TrackingPageBrowse, TrackConstants } from 'wdTracking/Index' | ||
| 13 | 14 | ||
| 14 | @Extend(Row) | 15 | @Extend(Row) |
| 15 | function otherStyle() { | 16 | function otherStyle() { |
| @@ -55,6 +56,8 @@ struct LoginPage { | @@ -55,6 +56,8 @@ struct LoginPage { | ||
| 55 | customStyle: true, | 56 | customStyle: true, |
| 56 | maskColor:"#00000000" | 57 | maskColor:"#00000000" |
| 57 | }) | 58 | }) |
| 59 | + pageShowTime:number = 0; | ||
| 60 | + pageHideTime:number = 0; | ||
| 58 | 61 | ||
| 59 | loginViewModel = new LoginViewModel() | 62 | loginViewModel = new LoginViewModel() |
| 60 | @State isProtocol:boolean=false | 63 | @State isProtocol:boolean=false |
| @@ -71,6 +74,14 @@ struct LoginPage { | @@ -71,6 +74,14 @@ struct LoginPage { | ||
| 71 | 74 | ||
| 72 | onPageShow() { | 75 | onPageShow() { |
| 73 | Logger.debug(TAG, "onPageShow:" + this.isCodeSend + "") | 76 | Logger.debug(TAG, "onPageShow:" + this.isCodeSend + "") |
| 77 | + this.pageShowTime = DateTimeUtils.getTimeStamp() | ||
| 78 | + } | ||
| 79 | + | ||
| 80 | + onPageHide(): void { | ||
| 81 | + this.pageHideTime = DateTimeUtils.getTimeStamp() | ||
| 82 | + let duration = 0 | ||
| 83 | + duration = Math.floor((this.pageHideTime - this.pageShowTime)/1000) | ||
| 84 | + TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Login_Page,TrackConstants.PageName.Login_Page,duration) | ||
| 74 | } | 85 | } |
| 75 | 86 | ||
| 76 | build() { | 87 | build() { |
-
Please register or login to post a comment