Showing
2 changed files
with
13 additions
and
2 deletions
| 1 | -import { PermissionUtil } from 'wdKit' | 1 | +import { DateTimeUtils, PermissionUtil } from 'wdKit' |
| 2 | import { PrivacySettingModel } from '../../model/PrivacySettingModel' | 2 | import { PrivacySettingModel } from '../../model/PrivacySettingModel' |
| 3 | import { Params } from 'wdBean'; | 3 | import { Params } from 'wdBean'; |
| 4 | import { WDRouterPage, WDRouterRule } from 'wdRouter'; | 4 | import { WDRouterPage, WDRouterRule } from 'wdRouter'; |
| 5 | import { HttpUtils } from 'wdNetwork/Index'; | 5 | import { HttpUtils } from 'wdNetwork/Index'; |
| 6 | +import { TrackingPageBrowse, TrackConstants } from 'wdTracking/Index'; | ||
| 6 | 7 | ||
| 7 | const TAG = 'PrivacySettingPage'; | 8 | const TAG = 'PrivacySettingPage'; |
| 8 | const DiyString = '开启个性化推荐' | 9 | const DiyString = '开启个性化推荐' |
| @@ -15,9 +16,19 @@ export struct PrivacySettingPage { | @@ -15,9 +16,19 @@ export struct PrivacySettingPage { | ||
| 15 | tips: string = '设置前可查阅' | 16 | tips: string = '设置前可查阅' |
| 16 | privacyTips: string = '《隐私政策》' | 17 | privacyTips: string = '《隐私政策》' |
| 17 | tipsEnd = '中相应权限使用规则' | 18 | tipsEnd = '中相应权限使用规则' |
| 19 | + pageShowTime:number = 0; | ||
| 20 | + pageHideTime:number = 0; | ||
| 18 | 21 | ||
| 19 | onPageShow(): void { | 22 | onPageShow(): void { |
| 20 | this.getPermissionStatus(); | 23 | this.getPermissionStatus(); |
| 24 | + this.pageShowTime = DateTimeUtils.getTimeStamp() | ||
| 25 | + } | ||
| 26 | + | ||
| 27 | + onPageHide(): void { | ||
| 28 | + this.pageHideTime = DateTimeUtils.getTimeStamp() | ||
| 29 | + let duration = 0 | ||
| 30 | + duration = Math.floor((this.pageHideTime - this.pageShowTime)/1000) | ||
| 31 | + TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Privacy_Setting,TrackConstants.PageName.Privacy_Setting,duration) | ||
| 21 | } | 32 | } |
| 22 | 33 | ||
| 23 | aboutToAppear() { | 34 | aboutToAppear() { |
| @@ -97,7 +97,7 @@ export namespace TrackConstants { | @@ -97,7 +97,7 @@ export namespace TrackConstants { | ||
| 97 | 97 | ||
| 98 | /// 设置页 | 98 | /// 设置页 |
| 99 | Setting = "settingPage", | 99 | Setting = "settingPage", |
| 100 | - /// 账号管理 | 100 | + /// 账号管理//账户与安全 |
| 101 | Account_Management = "accountManagementPage", | 101 | Account_Management = "accountManagementPage", |
| 102 | /// 注销账户 | 102 | /// 注销账户 |
| 103 | Cancel_Account = "cancelAccountPage", | 103 | Cancel_Account = "cancelAccountPage", |
-
Please register or login to post a comment