Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
yangchenggong1_wd
2024-05-21 16:36:00 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
64b39d3a1bc4e770a3e5ec5559a30b89187590bb
64b39d3a
1 parent
643ca8b4
desc:埋点[个人主页(客态) - 页面浏览]
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletions
sight_harmony/features/wdComponent/src/main/ets/pages/OtherNormalUserHomePage.ets
sight_harmony/features/wdComponent/src/main/ets/pages/OtherNormalUserHomePage.ets
View file @
64b39d3
import router from '@ohos.router'
import { Params } from 'wdBean';
import { NetworkUtil, StringUtils } from 'wdKit';
import { DateTimeUtils, NetworkUtil, StringUtils } from 'wdKit';
import { TrackingPageBrowse, TrackConstants } from 'wdTracking/Index';
import { OtherHomePageBottomCommentComponent } from '../components/mine/home/OtherHomePageBottomCommentComponent';
import { OtherHomePageBottomFollowComponent } from '../components/mine/home/OtherHomePageBottomFollowComponent';
import { CustomTitleUI } from '../components/reusable/CustomTitleUI';
...
...
@@ -16,9 +17,20 @@ struct OtherNormalUserHomePage {
@State params:Record<string, string> = router.getParams() as Record<string, string>;
@Watch('change') @State curUserId: string = '-1';
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
pageShowTime:number = 0;
pageHideTime:number = 0;
onPageShow() {
this.curUserId = this.params?.['userId'];
this.pageShowTime = DateTimeUtils.getTimeStamp()
}
onPageHide(): void {
this.pageHideTime = DateTimeUtils.getTimeStamp()
let duration = 0
duration = Math.floor((this.pageHideTime - this.pageShowTime)/1000)
TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Customer_Personal,TrackConstants.PageName.Customer_Personal,duration)
}
change(){
...
...
Please
register
or
login
to post a comment