chengen02

Merge remote-tracking branch 'origin/main'

Showing 29 changed files with 268 additions and 132 deletions
@@ -42,23 +42,23 @@ export class HttpParams { @@ -42,23 +42,23 @@ export class HttpParams {
42 switch (HostManager.getHost()) { 42 switch (HostManager.getHost()) {
43 case HostEnum.HOST_UAT: 43 case HostEnum.HOST_UAT:
44 headers['X-Ca-Stage'] = 'PRE' 44 headers['X-Ca-Stage'] = 'PRE'
45 - headers['Authorization'] = 'APPCODE 83092caa603a421aa0222308b3f6b27a'  
46 - headers['appCode'] = '83092caa603a421aa0222308b3f6b27a' 45 + headers['Authorization'] = 'APPCODE 5e1b07c336ac48ae90794fc4d69beaf9'
  46 + headers['appCode'] = '5e1b07c336ac48ae90794fc4d69beaf9'
47 break 47 break
48 case HostEnum.HOST_SIT: 48 case HostEnum.HOST_SIT:
49 headers['X-Ca-Stage'] = 'TEST' 49 headers['X-Ca-Stage'] = 'TEST'
50 - headers['Authorization'] = 'APPCODE 0af1f9085e484c97b2a44704bae72c07'  
51 - headers['appCode'] = '0af1f9085e484c97b2a44704bae72c07' 50 + headers['Authorization'] = 'APPCODE b7d32f50747d456d8c84ae51f3baaf56'
  51 + headers['appCode'] = 'b7d32f50747d456d8c84ae51f3baaf56'
52 break 52 break
53 case HostEnum.HOST_PRODUCT: 53 case HostEnum.HOST_PRODUCT:
54 headers['X-Ca-Stage'] = 'RELEASE' 54 headers['X-Ca-Stage'] = 'RELEASE'
55 - headers['Authorization'] = 'APPCODE 3d4181bceeb94d9780e10dbb6c67bbf6'  
56 - headers['appCode'] = '3d4181bceeb94d9780e10dbb6c67bbf6' 55 + headers['Authorization'] = 'APPCODE c148017260324c3ba7e612757e8146c1'
  56 + headers['appCode'] = 'c148017260324c3ba7e612757e8146c1'
57 break 57 break
58 case HostEnum.HOST_DEV: 58 case HostEnum.HOST_DEV:
59 headers['X-Ca-Stage'] = 'TEST' 59 headers['X-Ca-Stage'] = 'TEST'
60 - headers['Authorization'] = 'APPCODE ff33172859e14f9a8299e3bd769e79f9'  
61 - headers['appCode'] = 'ff33172859e14f9a8299e3bd769e79f9' 60 + headers['Authorization'] = 'APPCODE 9272b6a5ad0549a0ab399d0011109793'
  61 + headers['appCode'] = '9272b6a5ad0549a0ab399d0011109793'
62 break 62 break
63 default: 63 default:
64 break 64 break
@@ -82,26 +82,7 @@ export class HttpParams { @@ -82,26 +82,7 @@ export class HttpParams {
82 } 82 }
83 83
84 private static getVersion() { 84 private static getVersion() {
85 - // TODO 85 + // TODO build时间,待对接build生成属性
86 return '202401242103'; 86 return '202401242103';
87 } 87 }
88 -  
89 - private static getVersionCode() {  
90 - // TODO  
91 - return '10000';  
92 - }  
93 -  
94 - public static getVersionName() {  
95 - // TODO 读取配置  
96 - return '1.0.0';  
97 - }  
98 -  
99 - //获取机型  
100 - static getPhoneModel() {  
101 - return 'getPhoneModel'  
102 - }  
103 - //获取当前手机系统版本号  
104 - static getSystemVersion() {  
105 - return 'getSystemVersion'  
106 - }  
107 } 88 }
@@ -20,6 +20,7 @@ @@ -20,6 +20,7 @@
20 "wdJsBridge": "file:../../commons/wdJsBridge", 20 "wdJsBridge": "file:../../commons/wdJsBridge",
21 "wdDetailPlayApi": "file:../../features/wdDetailPlayApi", 21 "wdDetailPlayApi": "file:../../features/wdDetailPlayApi",
22 "wdHwAbility": "file:../../features/wdHwAbility", 22 "wdHwAbility": "file:../../features/wdHwAbility",
23 - "wdShare": "file:../../features/wdShare" 23 + "wdShare": "file:../../features/wdShare",
  24 + "wdTracking": "file:../../features/wdTracking"
24 } 25 }
25 } 26 }
1 import { FeedbackTypeBean, PhotoListBean } from 'wdBean/Index'; 1 import { FeedbackTypeBean, PhotoListBean } from 'wdBean/Index';
2 -import { FastClickUtil, Logger, NetworkUtil, StringUtils, ToastUtils, UserDataLocal } from 'wdKit/Index'; 2 +import { AppUtils,
  3 + DeviceUtil,
  4 + FastClickUtil, Logger, NetworkUtil, StringUtils, ToastUtils, UserDataLocal } from 'wdKit/Index';
3 import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailViewModel'; 5 import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailViewModel';
4 import { CustomTitleUI } from './reusable/CustomTitleUI' 6 import { CustomTitleUI } from './reusable/CustomTitleUI'
5 import { picker } from '@kit.CoreFileKit'; 7 import { picker } from '@kit.CoreFileKit';
@@ -8,7 +10,6 @@ import { router } from '@kit.ArkUI'; @@ -8,7 +10,6 @@ import { router } from '@kit.ArkUI';
8 import { CommonConstants } from 'wdConstant/Index'; 10 import { CommonConstants } from 'wdConstant/Index';
9 import { ProcessUtils } from 'wdRouter/Index'; 11 import { ProcessUtils } from 'wdRouter/Index';
10 import { HashMap } from '@kit.ArkTS'; 12 import { HashMap } from '@kit.ArkTS';
11 -import { HttpParams } from 'wdNetwork/src/main/ets/http/HttpCommonParams';  
12 13
13 const TAG = 'FeedBackActivity' 14 const TAG = 'FeedBackActivity'
14 15
@@ -355,8 +356,8 @@ export struct FeedBackActivity { @@ -355,8 +356,8 @@ export struct FeedBackActivity {
355 map.set("userName", UserDataLocal.getUserName()); 356 map.set("userName", UserDataLocal.getUserName());
356 } 357 }
357 //设备 358 //设备
358 - map.set("appVersion", "V" + HttpParams.getVersionName());  
359 - map.set("appDevice", "harmony" + HttpParams.getSystemVersion() + " " + HttpParams.getPhoneModel()); 359 + map.set("appVersion", "V" + AppUtils.getAppVersionName());
  360 + map.set("appDevice", "harmony" + DeviceUtil.getDisplayVersion() + " " + DeviceUtil.getProductModel());
360 // //投诉图片 361 // //投诉图片
361 // if (imageUrl.size() > 0) { 362 // if (imageUrl.size() > 0) {
362 // String[] str = imageUrl.toArray(new String[imageUrl.size()]); 363 // String[] str = imageUrl.toArray(new String[imageUrl.size()]);
@@ -244,10 +244,12 @@ export struct MorningEveningPaperComponent { @@ -244,10 +244,12 @@ export struct MorningEveningPaperComponent {
244 topicInfoView({ frontLinkObject: this.pageInfoBean?.topicInfo?.frontLinkObject }) 244 topicInfoView({ frontLinkObject: this.pageInfoBean?.topicInfo?.frontLinkObject })
245 } 245 }
246 246
  247 + if (this.audioPlayUrl.length > 0){
247 ListItem() { 248 ListItem() {
248 this.AudioBarView(this.simpleAudioDialog) 249 this.AudioBarView(this.simpleAudioDialog)
249 } 250 }
250 } 251 }
  252 + }
251 253
252 ListItem() { 254 ListItem() {
253 SingleColumn999Component({ 255 SingleColumn999Component({
@@ -39,7 +39,7 @@ export struct topicInfoView { @@ -39,7 +39,7 @@ export struct topicInfoView {
39 .borderRadius(2) 39 .borderRadius(2)
40 .padding({ left: 6, top: 4, bottom: 4 }) 40 .padding({ left: 6, top: 4, bottom: 4 })
41 41
42 - Image($r('app.media.more'))// .height($r('app.float.top_arrow_size')) 42 + Image($r('app.media.more_w'))// .height($r('app.float.top_arrow_size'))
43 .width(12) 43 .width(12)
44 .height(12) 44 .height(12)
45 .margin({ left: 4, right: 7 }) 45 .margin({ left: 4, right: 7 })
@@ -2,6 +2,7 @@ import MinePageMoreFunctionModel from '../../viewmodel/MinePageMoreFunctionModel @@ -2,6 +2,7 @@ import MinePageMoreFunctionModel from '../../viewmodel/MinePageMoreFunctionModel
2 import { WDRouterRule, WDRouterPage, ProcessUtils } from 'wdRouter' 2 import { WDRouterRule, WDRouterPage, ProcessUtils } from 'wdRouter'
3 import { Params } from 'wdBean'; 3 import { Params } from 'wdBean';
4 import { ToastUtils } from 'wdKit/Index'; 4 import { ToastUtils } from 'wdKit/Index';
  5 +import { TrackingButton, TrackConstants } from 'wdTracking/Index';
5 6
6 @Component 7 @Component
7 export default struct MinePageMoreFunctionUI { 8 export default struct MinePageMoreFunctionUI {
@@ -70,13 +71,16 @@ export default struct MinePageMoreFunctionUI { @@ -70,13 +71,16 @@ export default struct MinePageMoreFunctionUI {
70 .onClick(() => { 71 .onClick(() => {
71 console.log(index + "") 72 console.log(index + "")
72 if (item.msg == "设置") { //设置 73 if (item.msg == "设置") { //设置
  74 + trackButtonClick("myPageUserSetting")
73 let params: Params = { 75 let params: Params = {
74 pageID: 'mainSetting' 76 pageID: 'mainSetting'
75 } 77 }
76 WDRouterRule.jumpWithPage(WDRouterPage.settingPage, params) 78 WDRouterRule.jumpWithPage(WDRouterPage.settingPage, params)
77 }else if (item.msg == "关于") { // 关于 79 }else if (item.msg == "关于") { // 关于
  80 + trackButtonClick("myPageUserAbout")
78 WDRouterRule.jumpWithPage(WDRouterPage.aboutPage) 81 WDRouterRule.jumpWithPage(WDRouterPage.aboutPage)
79 }else if (item.msg == "意见反馈") { // 关于 82 }else if (item.msg == "意见反馈") { // 关于
  83 + trackButtonClick("myPageUserFeedBack")
80 ProcessUtils.gotoFeedBackActivity() 84 ProcessUtils.gotoFeedBackActivity()
81 } 85 }
82 }) 86 })
@@ -91,3 +95,7 @@ export default struct MinePageMoreFunctionUI { @@ -91,3 +95,7 @@ export default struct MinePageMoreFunctionUI {
91 .margin({ left: '23lpx', right: '23lpx', top: "19lpx" }) 95 .margin({ left: '23lpx', right: '23lpx', top: "19lpx" })
92 } 96 }
93 } 97 }
  98 +
  99 +function trackButtonClick(buttonName: string){
  100 + TrackingButton.click(buttonName, TrackConstants.PageName.My, TrackConstants.PageName.My)
  101 +}
1 import { WDRouterRule, WDRouterPage } from 'wdRouter' 1 import { WDRouterRule, WDRouterPage } from 'wdRouter'
  2 +import { TrackConstants } from 'wdTracking/src/main/ets/common/TrackConstants'
  3 +import { TrackingButton } from 'wdTracking/src/main/ets/tracking/TrackingButton'
2 import MinePageDatasModel from '../../model/MinePageDatasModel' 4 import MinePageDatasModel from '../../model/MinePageDatasModel'
3 import MinePagePersonalFunctionsItem from '../../viewmodel/MinePagePersonalFunctionsItem' 5 import MinePagePersonalFunctionsItem from '../../viewmodel/MinePagePersonalFunctionsItem'
4 import { PagePersonFunction } from './PagePersonFunction' 6 import { PagePersonFunction } from './PagePersonFunction'
@@ -25,6 +27,7 @@ export default struct MinePagePersonFunctionUI { @@ -25,6 +27,7 @@ export default struct MinePagePersonFunctionUI {
25 }else { 27 }else {
26 let params: Record<string, string> = {'comment': "1"}; 28 let params: Record<string, string> = {'comment': "1"};
27 WDRouterRule.jumpWithPage(WDRouterPage.mineHomePage,params) 29 WDRouterRule.jumpWithPage(WDRouterPage.mineHomePage,params)
  30 + trackButtonClick("myPageUserComment")
28 } 31 }
29 break; 32 break;
30 } 33 }
@@ -33,6 +36,7 @@ export default struct MinePagePersonFunctionUI { @@ -33,6 +36,7 @@ export default struct MinePagePersonFunctionUI {
33 WDRouterRule.jumpWithPage(WDRouterPage.loginPage) 36 WDRouterRule.jumpWithPage(WDRouterPage.loginPage)
34 return 37 return
35 } 38 }
  39 + trackButtonClick("myPageUserSubscribe")
36 WDRouterRule.jumpWithPage(WDRouterPage.appointmentListPage) 40 WDRouterRule.jumpWithPage(WDRouterPage.appointmentListPage)
37 break; 41 break;
38 } 42 }
@@ -42,6 +46,7 @@ export default struct MinePagePersonFunctionUI { @@ -42,6 +46,7 @@ export default struct MinePagePersonFunctionUI {
42 return 46 return
43 } 47 }
44 WDRouterRule.jumpWithPage(WDRouterPage.followListPage) 48 WDRouterRule.jumpWithPage(WDRouterPage.followListPage)
  49 + trackButtonClick("myPageUserFollow")
45 break; 50 break;
46 } 51 }
47 case "收藏":{ 52 case "收藏":{
@@ -50,6 +55,7 @@ export default struct MinePagePersonFunctionUI { @@ -50,6 +55,7 @@ export default struct MinePagePersonFunctionUI {
50 return 55 return
51 } 56 }
52 WDRouterRule.jumpWithPage(WDRouterPage.myCollectionListPagePage) 57 WDRouterRule.jumpWithPage(WDRouterPage.myCollectionListPagePage)
  58 + trackButtonClick("myPageUserCollection")
53 break; 59 break;
54 } 60 }
55 case "历史":{ 61 case "历史":{
@@ -66,6 +72,7 @@ export default struct MinePagePersonFunctionUI { @@ -66,6 +72,7 @@ export default struct MinePagePersonFunctionUI {
66 return 72 return
67 } 73 }
68 this.messageClick() 74 this.messageClick()
  75 + trackButtonClick("myPageUserNotice")
69 WDRouterRule.jumpWithPage(WDRouterPage.mineMessagePage) 76 WDRouterRule.jumpWithPage(WDRouterPage.mineMessagePage)
70 break; 77 break;
71 } 78 }
@@ -89,3 +96,7 @@ export default struct MinePagePersonFunctionUI { @@ -89,3 +96,7 @@ export default struct MinePagePersonFunctionUI {
89 } 96 }
90 } 97 }
91 98
  99 +function trackButtonClick(buttonName: string){
  100 + TrackingButton.click(buttonName, TrackConstants.PageName.My, TrackConstants.PageName.My)
  101 +}
  102 +
1 import { StringUtils, UserDataLocal } from 'wdKit' 1 import { StringUtils, UserDataLocal } from 'wdKit'
2 import { WDRouterPage, WDRouterRule } from 'wdRouter' 2 import { WDRouterPage, WDRouterRule } from 'wdRouter'
  3 +import { TrackingButton, TrackConstants } from 'wdTracking/Index'
3 import MinePageDatasModel from '../../model/MinePageDatasModel' 4 import MinePageDatasModel from '../../model/MinePageDatasModel'
4 const TAG = "MinePageUserSimpleInfoUI" 5 const TAG = "MinePageUserSimpleInfoUI"
5 6
@@ -45,6 +46,7 @@ export default struct MinePageUserSimpleInfoUI { @@ -45,6 +46,7 @@ export default struct MinePageUserSimpleInfoUI {
45 .alignContent(Alignment.Center) 46 .alignContent(Alignment.Center)
46 .onClick(()=>{ 47 .onClick(()=>{
47 this.jumpLogin() 48 this.jumpLogin()
  49 + trackButtonClick("myPageUserHead")
48 }) 50 })
49 51
50 if(this.isLogin){ 52 if(this.isLogin){
@@ -68,6 +70,7 @@ export default struct MinePageUserSimpleInfoUI { @@ -68,6 +70,7 @@ export default struct MinePageUserSimpleInfoUI {
68 }.width('100%') 70 }.width('100%')
69 .onClick(()=>{ 71 .onClick(()=>{
70 this.jumpLogin() 72 this.jumpLogin()
  73 + trackButtonClick("myPageUserName")
71 }) 74 })
72 75
73 Stack(){ 76 Stack(){
@@ -101,6 +104,7 @@ export default struct MinePageUserSimpleInfoUI { @@ -101,6 +104,7 @@ export default struct MinePageUserSimpleInfoUI {
101 Blank() 104 Blank()
102 }.onClick(()=>{ 105 }.onClick(()=>{
103 this.jumpLogin() 106 this.jumpLogin()
  107 + trackButtonClick("myPageUserLogin")
104 }) 108 })
105 .margin({top:'11lpx',left:'23lpx'}) 109 .margin({top:'11lpx',left:'23lpx'})
106 .width('352lpx') 110 .width('352lpx')
@@ -198,3 +202,7 @@ export default struct MinePageUserSimpleInfoUI { @@ -198,3 +202,7 @@ export default struct MinePageUserSimpleInfoUI {
198 } 202 }
199 } 203 }
200 } 204 }
  205 +
  206 +function trackButtonClick(buttonName: string){
  207 + TrackingButton.click(buttonName, TrackConstants.PageName.My, TrackConstants.PageName.My)
  208 +}
1 import { DateTimeUtils, StringUtils, ToastUtils } from 'wdKit/Index' 1 import { DateTimeUtils, StringUtils, ToastUtils } from 'wdKit/Index'
2 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index' 2 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'
3 -import { WDMessageCenterMessageType } from '../../../model/InteractMessageModel' 3 +import { Remark, WDMessageCenterMessageType } from '../../../model/InteractMessageModel'
4 import MinePageDatasModel from '../../../model/MinePageDatasModel' 4 import MinePageDatasModel from '../../../model/MinePageDatasModel'
5 import { MessageItem } from '../../../viewmodel/MessageItem' 5 import { MessageItem } from '../../../viewmodel/MessageItem'
6 import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh' 6 import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh'
@@ -66,6 +66,24 @@ export struct MessageListUI { @@ -66,6 +66,24 @@ export struct MessageListUI {
66 if (value.activeInfo.title) { 66 if (value.activeInfo.title) {
67 item.desc = value.activeInfo.title.replace("null","") 67 item.desc = value.activeInfo.title.replace("null","")
68 } 68 }
  69 + let remark = JSON.parse(value.activeInfo.remark) as Remark
  70 + switch (value.activeInfo.contentType){
  71 + case "204":
  72 + item.desc = remark.userName + "关注了你"
  73 + break;
  74 + case "206":
  75 + item.desc = remark.userName +"赞了你的作品"
  76 + break;
  77 + case "207":
  78 + item.desc = remark.userName + "赞了你的评论"
  79 + break;
  80 + case "208":
  81 + item.desc = remark.userName + "评论了你的作品"
  82 + break;
  83 + case "209":
  84 + item.desc = remark.userName + "回复了你的评论"
  85 + break;
  86 + }
69 if (value.activeInfo.time) { 87 if (value.activeInfo.time) {
70 item.time = this.getPublishTime(value.subscribeInfo.time,DateTimeUtils.getDateTimestamp(value.activeInfo.time) + "") 88 item.time = this.getPublishTime(value.subscribeInfo.time,DateTimeUtils.getDateTimestamp(value.activeInfo.time) + "")
71 } 89 }
  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(){
@@ -73,7 +73,7 @@ export struct BottomNavigationComponent { @@ -73,7 +73,7 @@ export struct BottomNavigationComponent {
73 TabContent() { 73 TabContent() {
74 if (CompUtils.isMine(navItem)) { 74 if (CompUtils.isMine(navItem)) {
75 // 我的页面组件数据列表 75 // 我的页面组件数据列表
76 - MinePageComponent() 76 + MinePageComponent({isMinePage: this.currentNavIndex === this.bottomNavList.length-1})
77 } else if (navItem.name === '视频') { 77 } else if (navItem.name === '视频') {
78 // 视频频道,包含视频和直播 78 // 视频频道,包含视频和直播
79 VideoChannelPage({ 79 VideoChannelPage({
@@ -424,7 +424,7 @@ export struct PaperSingleColumn999CardView { @@ -424,7 +424,7 @@ export struct PaperSingleColumn999CardView {
424 Text(this.item?.newsTitle) 424 Text(this.item?.newsTitle)
425 .fontColor('#222222') 425 .fontColor('#222222')
426 .fontSize(16) 426 .fontSize(16)
427 - .fontWeight(FontWeight.Bold) 427 + .fontWeight(FontWeight.Medium)
428 .alignSelf(ItemAlign.Start) 428 .alignSelf(ItemAlign.Start)
429 .maxLines(3) 429 .maxLines(3)
430 .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。 430 .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。
@@ -478,6 +478,7 @@ export struct PaperSingleColumn999CardView { @@ -478,6 +478,7 @@ export struct PaperSingleColumn999CardView {
478 if (this.item) { 478 if (this.item) {
479 Row() { 479 Row() {
480 Row() { 480 Row() {
  481 + if (this.item?.source.length > 0) {
481 Text(this.item?.source) 482 Text(this.item?.source)
482 .fontSize(12) 483 .fontSize(12)
483 .fontColor('#B0B0B0') 484 .fontColor('#B0B0B0')
@@ -486,9 +487,12 @@ export struct PaperSingleColumn999CardView { @@ -486,9 +487,12 @@ export struct PaperSingleColumn999CardView {
486 .width(16) 487 .width(16)
487 .height(16) 488 .height(16)
488 .margin({ top: 10, bottom: 10 }) 489 .margin({ top: 10, bottom: 10 })
  490 + }
  491 +
489 Text(this.getPublishTime()) 492 Text(this.getPublishTime())
490 .fontSize(12) 493 .fontSize(12)
491 .fontColor('#B0B0B0') 494 .fontColor('#B0B0B0')
  495 + .margin({ left: this.item?.source.length > 0?0:16 })
492 if (this.item.objectType != '2' && this.interactData && this.interactData.commentNum && Number(this.interactData.collectNum) > 0) { 496 if (this.item.objectType != '2' && this.interactData && this.interactData.commentNum && Number(this.interactData.collectNum) > 0) {
493 Text(this.interactData.commentNum + "评") 497 Text(this.interactData.commentNum + "评")
494 .fontSize(12) 498 .fontSize(12)
1 import { Params } from 'wdBean'; 1 import { Params } from 'wdBean';
2 import { FollowFirstTabsComponent } from '../mine/follow/FollowFirstTabsComponent' 2 import { FollowFirstTabsComponent } from '../mine/follow/FollowFirstTabsComponent'
3 import router from '@ohos.router'; 3 import router from '@ohos.router';
  4 +import { DateTimeUtils } from 'wdKit/Index';
  5 +import { TrackingPageBrowse, TrackConstants } from 'wdTracking/Index';
4 6
5 @Entry 7 @Entry
6 @Component 8 @Component
7 struct FollowListPage { 9 struct FollowListPage {
8 @State params:Record<string, string> = router.getParams() as Record<string, string>; 10 @State params:Record<string, string> = router.getParams() as Record<string, string>;
9 @State curIndex: string = '0'; 11 @State curIndex: string = '0';
  12 + pageShowTime:number = 0;
  13 + pageHideTime:number = 0;
10 14
11 onPageShow() { 15 onPageShow() {
12 this.curIndex = this.params?.['index']; 16 this.curIndex = this.params?.['index'];
  17 + this.pageShowTime = DateTimeUtils.getTimeStamp()
  18 + }
  19 +
  20 + onPageHide(): void {
  21 + this.pageHideTime = DateTimeUtils.getTimeStamp()
  22 + let duration = 0
  23 + duration = Math.floor((this.pageHideTime - this.pageShowTime)/1000)
  24 + TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.My_Follow,TrackConstants.PageName.My_Follow,duration)
13 } 25 }
14 26
15 build() { 27 build() {
@@ -5,10 +5,12 @@ import MinePageDatasModel from '../../model/MinePageDatasModel' @@ -5,10 +5,12 @@ import MinePageDatasModel from '../../model/MinePageDatasModel'
5 import MinePageUserSimpleInfoUI from '../mine/MinePageUserSimpleInfoUI' 5 import MinePageUserSimpleInfoUI from '../mine/MinePageUserSimpleInfoUI'
6 import MinePagePersonFunctionUI from '../mine/MinePagePersonFunctionUI' 6 import MinePagePersonFunctionUI from '../mine/MinePagePersonFunctionUI'
7 import MinePageMoreFunctionUI from '../mine/MinePageMoreFunctionUI' 7 import MinePageMoreFunctionUI from '../mine/MinePageMoreFunctionUI'
8 -import { SPHelper, StringUtils } from 'wdKit' 8 +import { DateTimeUtils, SPHelper, StringUtils } from 'wdKit'
9 import { SpConstants } from 'wdConstant' 9 import { SpConstants } from 'wdConstant'
10 import dataPreferences from '@ohos.data.preferences'; 10 import dataPreferences from '@ohos.data.preferences';
11 import { MergeRecordDialog } from '../../dialog/MergeRecordDialog' 11 import { MergeRecordDialog } from '../../dialog/MergeRecordDialog'
  12 +import { TrackingPageBrowse } from 'wdTracking/src/main/ets/tracking/TrackingPageBrowse'
  13 +import { TrackConstants } from 'wdTracking/src/main/ets/common/TrackConstants'
12 14
13 const TAG = 'MinePageComponent'; 15 const TAG = 'MinePageComponent';
14 16
@@ -52,12 +54,35 @@ export struct MinePageComponent { @@ -52,12 +54,35 @@ export struct MinePageComponent {
52 autoCancel: false 54 autoCancel: false
53 }) 55 })
54 @Consume @Watch('pageShowForUpdateData') pageShow :number 56 @Consume @Watch('pageShowForUpdateData') pageShow :number
  57 + @Consume @Watch('pageHideForUpdateData') pageHide :number
  58 + pageShowTime:number = 0;
  59 + pageHideTime:number = 0;
  60 + pageFirstCreateTime:number = 0;
  61 + @Prop isMinePage:boolean = false;
55 62
  63 + //第一次还没创建时候 pageShow 接收不到监听
56 pageShowForUpdateData(): void { 64 pageShowForUpdateData(): void {
  65 + if(this.isMinePage){
57 this.getMessageData() 66 this.getMessageData()
  67 + this.pageShowTime = DateTimeUtils.getTimeStamp()
  68 + }
  69 + }
  70 + pageHideForUpdateData(): void {
  71 + if(this.isMinePage){
  72 + this.pageHideTime = DateTimeUtils.getTimeStamp()
  73 + let duration = 0
  74 + if(this.pageShowTime != 0){
  75 + duration = (this.pageHideTime - this.pageShowTime)/1000
  76 + }else{
  77 + duration = (this.pageHideTime - this.pageFirstCreateTime)/1000
  78 + }
  79 + TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.My,TrackConstants.PageName.My,Math.floor(duration))
  80 + }
58 } 81 }
59 82
60 aboutToAppear(){ 83 aboutToAppear(){
  84 + this.pageFirstCreateTime = DateTimeUtils.getTimeStamp()
  85 +
61 this.getUserLogin() 86 this.getUserLogin()
62 this.getFunctionData() 87 this.getFunctionData()
63 this.addLoginStatusObserver() 88 this.addLoginStatusObserver()
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() {
  1 +import { DateTimeUtils } from 'wdKit/Index';
  2 +import { TrackingPageBrowse, TrackConstants } from 'wdTracking/Index';
1 import { AboutPageUI } from '../setting/AboutPageUI'; 3 import { AboutPageUI } from '../setting/AboutPageUI';
2 4
3 @Entry 5 @Entry
4 @Component 6 @Component
5 struct SettingAboutPage { 7 struct SettingAboutPage {
  8 + pageShowTime:number = 0;
  9 + pageHideTime:number = 0;
  10 +
  11 + onPageShow() {
  12 + this.pageShowTime = DateTimeUtils.getTimeStamp()
  13 + }
  14 +
  15 + onPageHide(): void {
  16 + this.pageHideTime = DateTimeUtils.getTimeStamp()
  17 + let duration = 0
  18 + duration = Math.floor((this.pageHideTime - this.pageShowTime)/1000)
  19 + TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.About,TrackConstants.PageName.About,duration)
  20 + }
  21 +
  22 +
6 build() { 23 build() {
7 Column(){ 24 Column(){
8 AboutPageUI() 25 AboutPageUI()
@@ -4,6 +4,7 @@ import { AccountAndSecurityLayout } from '../setting/AccountAndSecurityLayout'; @@ -4,6 +4,7 @@ import { AccountAndSecurityLayout } from '../setting/AccountAndSecurityLayout';
4 import router from '@ohos.router'; 4 import router from '@ohos.router';
5 import { Action, Params } from 'wdBean'; 5 import { Action, Params } from 'wdBean';
6 import { DateTimeUtils } from 'wdKit/Index'; 6 import { DateTimeUtils } from 'wdKit/Index';
  7 +import { TrackingPageBrowse, TrackConstants } from 'wdTracking/Index';
7 8
8 @Entry 9 @Entry
9 @Component 10 @Component
@@ -13,10 +14,39 @@ struct SettingPage { @@ -13,10 +14,39 @@ struct SettingPage {
13 @State params:Params = router.getParams() as Params; 14 @State params:Params = router.getParams() as Params;
14 @State enterActivityTime:number = 0; 15 @State enterActivityTime:number = 0;
15 16
16 - onPageShow() { 17 + pageShowSettingTime:number = 0;
  18 + pageHideSettingTime:number = 0;
  19 + pageShowAccountTime:number = 0;
  20 + pageHideAccountTime:number = 0;
17 21
  22 + onPageShow() {
18 this.pageType = this.params.pageID; 23 this.pageType = this.params.pageID;
19 this.enterActivityTime = DateTimeUtils.getTimeStamp() 24 this.enterActivityTime = DateTimeUtils.getTimeStamp()
  25 + if (this.pageType == 'mainSetting'){
  26 + this.pageShowSettingTime = DateTimeUtils.getTimeStamp()
  27 + }else{
  28 + this.pageShowAccountTime = DateTimeUtils.getTimeStamp()
  29 + }
  30 + }
  31 +
  32 + onPageHide(): void {
  33 + if (this.pageType == 'mainSetting'){
  34 + this.pageHideSettingTime = DateTimeUtils.getTimeStamp()
  35 + }else{
  36 + this.pageHideAccountTime = DateTimeUtils.getTimeStamp()
  37 + }
  38 +
  39 + let duration = 0
  40 + if(this.pageType == 'mainSetting'){
  41 + duration = Math.floor((this.pageHideSettingTime - this.pageShowSettingTime)/1000)
  42 + }else{
  43 + duration = Math.floor((this.pageHideAccountTime - this.pageShowAccountTime)/1000)
  44 + }
  45 + if(this.pageType == 'mainSetting'){
  46 + TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Setting,TrackConstants.PageName.Setting,duration)
  47 + }else{
  48 + TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Account_Management,TrackConstants.PageName.Account_Management,duration)
  49 + }
20 } 50 }
21 51
22 build() { 52 build() {
@@ -24,11 +24,7 @@ export struct AboutPageUI { @@ -24,11 +24,7 @@ export struct AboutPageUI {
24 }) 24 })
25 25
26 build() { 26 build() {
27 - // Navigation() {  
28 - //滑动区域  
29 this.aboutUi() 27 this.aboutUi()
30 - // }.titleMode(NavigationTitleMode.Mini)  
31 - // .title('关于')  
32 } 28 }
33 29
34 aboutToAppear() { 30 aboutToAppear() {
@@ -55,18 +51,6 @@ export struct AboutPageUI { @@ -55,18 +51,6 @@ export struct AboutPageUI {
55 this.dialogController.open() 51 this.dialogController.open()
56 }) 52 })
57 ) 53 )
58 - // Row(){  
59 - //  
60 - // }.backgroundColor(Color.Yellow)  
61 - // .width('100%')  
62 - // .height('97lpx')  
63 -  
64 - // Row(){  
65 - //  
66 - // }.backgroundColor(Color.Yellow)  
67 - // .width('100%')  
68 - // .height('97lpx')  
69 -  
70 54
71 List() { 55 List() {
72 ForEach(this.listData, (item: string, index: number) => { 56 ForEach(this.listData, (item: string, index: number) => {
@@ -85,69 +85,6 @@ export struct MineSettingComponent { @@ -85,69 +85,6 @@ export struct MineSettingComponent {
85 } 85 }
86 } 86 }
87 87
88 - // // 页面布局  
89 - // @Builder settingList() {  
90 - // Column() {  
91 - // List() {  
92 - // // 循环渲染ListItemGroup,contactsGroups为多个分组联系人contacts和标题title的数据集合  
93 - // ForEach(this.listData, (item: Array<string>, index: number) => {  
94 - // ListItemGroup({ header: index === 0 ? this.itemHead("") : this.itemHead("1") }) {  
95 - // // 循环渲染ListItem  
96 - // ForEach(item, (subItem: string, subIndex: number) => {  
97 - // ListItem() {  
98 - // if (subIndex == 6) {  
99 - // this.getArrowCell(subItem, subIndex, index)  
100 - // } else if (subIndex == 1 || subIndex == 3 || subIndex == 4 || subIndex == 5) {  
101 - // if (subIndex == 1 && index == 1) {  
102 - // this.getArrowCell(subItem, subIndex, index)  
103 - // } else {  
104 - // this.getSwitchCell(subItem, subIndex)  
105 - // }  
106 - //  
107 - // } else {  
108 - // this.getArrowCell(subItem, subIndex, index)  
109 - // }  
110 - //  
111 - // }.padding({ left: '27lpx' })  
112 - // .onClick(() => {  
113 - //  
114 - // // // 在Home页面中  
115 - // // let paramsInfo: object = {  
116 - // // pageId: 123,  
117 - // // pageType:'AccountAndSecurityLayout'  
118 - // // };  
119 - // console.log(subIndex + "")  
120 - // if (subIndex == 0 && index == 0) {  
121 - //  
122 - // let params: Params = {  
123 - // pageID: 'AccountAndSecurityLayout'  
124 - // }  
125 - // WDRouterRule.jumpWithPage(WDRouterPage.settingPage, params)  
126 - // }else if (subIndex == 2 && index == 0) {  
127 - // WDRouterRule.jumpWithPage(WDRouterPage.privacySettingPage)  
128 - // }else if (subIndex == 0 && index == 1) {  
129 - // this.dialogController.open()  
130 - // }  
131 - //  
132 - // })  
133 - // .height('117lpx')  
134 - // })  
135 - // }  
136 - // .divider({  
137 - // strokeWidth: 1,  
138 - // startMargin: 15,  
139 - // endMargin: 10,  
140 - // color: '#f0f0f0'  
141 - // })  
142 - // })  
143 - // }.onScrollFrameBegin((offset, state) => {  
144 - // return { offsetRemain: 0 }  
145 - // })  
146 - // }  
147 - // .backgroundColor(Color.White)  
148 - // .borderRadius(8)  
149 - // }  
150 -  
151 // 页面布局 88 // 页面布局
152 @Builder settingList() { 89 @Builder settingList() {
153 Column() { 90 Column() {
@@ -247,12 +184,6 @@ export struct MineSettingComponent { @@ -247,12 +184,6 @@ export struct MineSettingComponent {
247 Row() { 184 Row() {
248 // 左侧logo和标题 185 // 左侧logo和标题
249 Row() { 186 Row() {
250 - // 判断有没有图片  
251 - // if (this.privacySwitch) {  
252 - // Image('https://pic.rmb.bdstatic.com/e182cf67c341d1128d2a6cc05886bf62.jpeg@s_0,h_2000')  
253 - // .height('38lpx')  
254 - // .margin({ right: '5lpx' })  
255 - // }  
256 Text(`${item.title}`) 187 Text(`${item.title}`)
257 .margin({ top: '8lpx' }) 188 .margin({ top: '8lpx' })
258 .height('38lpx') 189 .height('38lpx')
@@ -109,4 +109,5 @@ export class Remark{ @@ -109,4 +109,5 @@ export class Remark{
109 coverImageUrl:string = "" 109 coverImageUrl:string = ""
110 relationId:string = "" 110 relationId:string = ""
111 status:string = "" 111 status:string = ""
  112 + userName:string = ""
112 } 113 }
1 import router from '@ohos.router' 1 import router from '@ohos.router'
2 -import { NetworkUtil, StringUtils } from 'wdKit'; 2 +import { DateTimeUtils, NetworkUtil, StringUtils } from 'wdKit';
3 import { WDRouterPage, WDRouterRule } from 'wdRouter'; 3 import { WDRouterPage, WDRouterRule } from 'wdRouter';
4 import { editModelParams } from '../model/EditInfoModel'; 4 import { editModelParams } from '../model/EditInfoModel';
5 import { HomePageBottomCommentComponent } from '../components/mine/home/HomePageBottomCommentComponent'; 5 import { HomePageBottomCommentComponent } from '../components/mine/home/HomePageBottomCommentComponent';
@@ -7,6 +7,7 @@ import { HomePageBottomFollowComponent } from '../components/mine/home/HomePageB @@ -7,6 +7,7 @@ import { HomePageBottomFollowComponent } from '../components/mine/home/HomePageB
7 import MinePageDatasModel from '../model/MinePageDatasModel'; 7 import MinePageDatasModel from '../model/MinePageDatasModel';
8 import { EmptyComponent } from '../components/view/EmptyComponent'; 8 import { EmptyComponent } from '../components/view/EmptyComponent';
9 import { CustomTitleUI } from '../components/reusable/CustomTitleUI'; 9 import { CustomTitleUI } from '../components/reusable/CustomTitleUI';
  10 +import { TrackingPageBrowse, TrackConstants } from 'wdTracking/Index';
10 11
11 const TAG = "MineHomePage" 12 const TAG = "MineHomePage"
12 13
@@ -37,8 +38,11 @@ struct MineHomePage { @@ -37,8 +38,11 @@ struct MineHomePage {
37 @State isCommentEnter:string = ""; 38 @State isCommentEnter:string = "";
38 @State isConnectNetwork : boolean = NetworkUtil.isNetConnected() 39 @State isConnectNetwork : boolean = NetworkUtil.isNetConnected()
39 @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 40 @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
  41 + pageShowTime:number = 0;
  42 + pageHideTime:number = 0;
40 43
41 onPageShow(): void { 44 onPageShow(): void {
  45 + this.pageShowTime = DateTimeUtils.getTimeStamp()
42 this.getUserInfo() 46 this.getUserInfo()
43 47
44 let intervalID = setInterval(() => { 48 let intervalID = setInterval(() => {
@@ -50,6 +54,13 @@ struct MineHomePage { @@ -50,6 +54,13 @@ struct MineHomePage {
50 }, 200); 54 }, 200);
51 } 55 }
52 56
  57 + onPageHide(): void {
  58 + this.pageHideTime = DateTimeUtils.getTimeStamp()
  59 + let duration = 0
  60 + duration = Math.floor((this.pageHideTime - this.pageShowTime)/1000)
  61 + TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Main_Personal,TrackConstants.PageName.Main_Personal,duration)
  62 + }
  63 +
53 build() { 64 build() {
54 if(this.isConnectNetwork){ 65 if(this.isConnectNetwork){
55 Stack({ alignContent: Alignment.Top }){ 66 Stack({ alignContent: Alignment.Top }){
1 import router from '@ohos.router' 1 import router from '@ohos.router'
2 import { Params } from 'wdBean'; 2 import { Params } from 'wdBean';
3 -import { NetworkUtil, StringUtils } from 'wdKit'; 3 +import { DateTimeUtils, NetworkUtil, StringUtils } from 'wdKit';
  4 +import { TrackingPageBrowse, TrackConstants } from 'wdTracking/Index';
4 import { OtherHomePageBottomCommentComponent } from '../components/mine/home/OtherHomePageBottomCommentComponent'; 5 import { OtherHomePageBottomCommentComponent } from '../components/mine/home/OtherHomePageBottomCommentComponent';
5 import { OtherHomePageBottomFollowComponent } from '../components/mine/home/OtherHomePageBottomFollowComponent'; 6 import { OtherHomePageBottomFollowComponent } from '../components/mine/home/OtherHomePageBottomFollowComponent';
6 import { CustomTitleUI } from '../components/reusable/CustomTitleUI'; 7 import { CustomTitleUI } from '../components/reusable/CustomTitleUI';
@@ -16,9 +17,20 @@ struct OtherNormalUserHomePage { @@ -16,9 +17,20 @@ struct OtherNormalUserHomePage {
16 @State params:Record<string, string> = router.getParams() as Record<string, string>; 17 @State params:Record<string, string> = router.getParams() as Record<string, string>;
17 @Watch('change') @State curUserId: string = '-1'; 18 @Watch('change') @State curUserId: string = '-1';
18 @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 19 @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
  20 + pageShowTime:number = 0;
  21 + pageHideTime:number = 0;
  22 +
19 23
20 onPageShow() { 24 onPageShow() {
21 this.curUserId = this.params?.['userId']; 25 this.curUserId = this.params?.['userId'];
  26 + this.pageShowTime = DateTimeUtils.getTimeStamp()
  27 + }
  28 +
  29 + onPageHide(): void {
  30 + this.pageHideTime = DateTimeUtils.getTimeStamp()
  31 + let duration = 0
  32 + duration = Math.floor((this.pageHideTime - this.pageShowTime)/1000)
  33 + TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Customer_Personal,TrackConstants.PageName.Customer_Personal,duration)
22 } 34 }
23 35
24 change(){ 36 change(){
  1 +import { DateTimeUtils } from 'wdKit/Index';
  2 +import { TrackingPageBrowse, TrackConstants } from 'wdTracking/Index';
1 import { SearchComponent } from '../components/search/SearchComponent' 3 import { SearchComponent } from '../components/search/SearchComponent'
2 4
3 @Entry 5 @Entry
4 @Component 6 @Component
5 struct SearchPage { 7 struct SearchPage {
  8 + pageShowTime:number = 0;
  9 + pageHideTime:number = 0;
  10 +
  11 + onPageShow() {
  12 + this.pageShowTime = DateTimeUtils.getTimeStamp()
  13 + }
  14 +
  15 + onPageHide(): void {
  16 + this.pageHideTime = DateTimeUtils.getTimeStamp()
  17 + let duration = 0
  18 + duration = Math.floor((this.pageHideTime - this.pageShowTime)/1000)
  19 + TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Search,TrackConstants.PageName.Search,duration)
  20 + }
  21 +
6 build() { 22 build() {
7 Column(){ 23 Column(){
8 SearchComponent() 24 SearchComponent()
@@ -41,11 +41,23 @@ class SystemInfo{ @@ -41,11 +41,23 @@ class SystemInfo{
41 time: string = "" 41 time: string = ""
42 title: string = "" 42 title: string = ""
43 userId: number = -1 43 userId: number = -1
  44 + remark: string = ""
44 } 45 }
45 46
46 class ActiveInfo{ 47 class ActiveInfo{
47 - id:string = "" 48 + classify: string = ""
  49 + contentId: string = ""
  50 + contentType: string = ""
  51 + id: number = -1
48 message: string = "" 52 message: string = ""
  53 + platform: string = ""
  54 + privateMailId: number = -1
  55 + privateMailIds: string = ""
  56 + privateMailNum: number = -1
  57 + read: boolean = false
  58 + source: string = ""
49 time: string = "" 59 time: string = ""
50 title: string = "" 60 title: string = ""
  61 + userId: number = -1
  62 + remark: string = ""
51 } 63 }
@@ -12,6 +12,7 @@ @@ -12,6 +12,7 @@
12 "wdWebComponent": "file:../../commons/wdWebComponent", 12 "wdWebComponent": "file:../../commons/wdWebComponent",
13 "wdBean": "file:../../features/wdBean", 13 "wdBean": "file:../../features/wdBean",
14 "wdRouter": "file:../../commons/wdRouter", 14 "wdRouter": "file:../../commons/wdRouter",
15 - "wdNetwork": "file:../../commons/wdNetwork" 15 + "wdNetwork": "file:../../commons/wdNetwork",
  16 + "wdTracking": "file:../../features/wdTracking"
16 } 17 }
17 } 18 }
@@ -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
@@ -70,7 +73,15 @@ struct LoginPage { @@ -70,7 +73,15 @@ struct LoginPage {
70 } 73 }
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() {
1 -import { CustomToast} from 'wdKit/Index'; 1 +import { CustomToast, DateTimeUtils} from 'wdKit/Index';
2 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; 2 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
3 import { LoginModel } from './LoginModel'; 3 import { LoginModel } from './LoginModel';
4 import { ModifyPasswordRequestItem } from './ModifyPasswordRequestItem'; 4 import { ModifyPasswordRequestItem } from './ModifyPasswordRequestItem';
5 import { router } from '@kit.ArkUI'; 5 import { router } from '@kit.ArkUI';
6 import { encryptMessage } from '../../utils/cryptoUtil'; 6 import { encryptMessage } from '../../utils/cryptoUtil';
  7 +import { TrackingPageBrowse, TrackConstants } from 'wdTracking/Index';
7 8
8 /** 9 /**
9 * 修改密码页面 10 * 修改密码页面
@@ -26,7 +27,19 @@ struct ModifyPasswordPage { @@ -26,7 +27,19 @@ struct ModifyPasswordPage {
26 customStyle: true, 27 customStyle: true,
27 maskColor:"#00000000" 28 maskColor:"#00000000"
28 }) 29 })
  30 + pageShowTime:number = 0;
  31 + pageHideTime:number = 0;
29 32
  33 + onPageShow() {
  34 + this.pageShowTime = DateTimeUtils.getTimeStamp()
  35 + }
  36 +
  37 + onPageHide(): void {
  38 + this.pageHideTime = DateTimeUtils.getTimeStamp()
  39 + let duration = 0
  40 + duration = Math.floor((this.pageHideTime - this.pageShowTime)/1000)
  41 + TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Change_Passwd,TrackConstants.PageName.Change_Passwd,duration)
  42 + }
30 43
31 build() { 44 build() {
32 Row() { 45 Row() {
@@ -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",