Showing
17 changed files
with
193 additions
and
59 deletions
| @@ -11,6 +11,8 @@ import { LiveRoomDataBean } from '../live/LiveRoomDataBean'; | @@ -11,6 +11,8 @@ import { LiveRoomDataBean } from '../live/LiveRoomDataBean'; | ||
| 11 | 11 | ||
| 12 | @Observed | 12 | @Observed |
| 13 | export class ContentDTO implements BaseDTO { | 13 | export class ContentDTO implements BaseDTO { |
| 14 | + seoTags?:string; | ||
| 15 | + liveType?: string; // 直播新闻-直播状态 | ||
| 14 | expIds: string = ''; | 16 | expIds: string = ''; |
| 15 | itemId: string = ''; | 17 | itemId: string = ''; |
| 16 | shareFlag?: string = '1'; | 18 | shareFlag?: string = '1'; |
| @@ -99,6 +101,8 @@ export class ContentDTO implements BaseDTO { | @@ -99,6 +101,8 @@ export class ContentDTO implements BaseDTO { | ||
| 99 | 101 | ||
| 100 | static clone(old: ContentDTO): ContentDTO { | 102 | static clone(old: ContentDTO): ContentDTO { |
| 101 | let content = new ContentDTO(); | 103 | let content = new ContentDTO(); |
| 104 | + content.liveType = old.liveType; | ||
| 105 | + content.seoTags = old.seoTags; | ||
| 102 | content.appStyle = old.appStyle; | 106 | content.appStyle = old.appStyle; |
| 103 | content.cityCode = old.cityCode; | 107 | content.cityCode = old.cityCode; |
| 104 | content.coverSize = old.coverSize; | 108 | content.coverSize = old.coverSize; |
| @@ -239,15 +239,9 @@ export struct MorningEveningPaperComponent { | @@ -239,15 +239,9 @@ export struct MorningEveningPaperComponent { | ||
| 239 | // WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', }) | 239 | // WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', }) |
| 240 | } | 240 | } |
| 241 | 241 | ||
| 242 | - onPageShow(){ | ||
| 243 | - TrackingPageBrowseUtils.TrackingPageBrowseExposureStart() | ||
| 244 | - } | ||
| 245 | - | ||
| 246 | onPageHide() { | 242 | onPageHide() { |
| 247 | this.status = PlayerConstants.STATUS_PAUSE; | 243 | this.status = PlayerConstants.STATUS_PAUSE; |
| 248 | this.playerController?.pause(); | 244 | this.playerController?.pause(); |
| 249 | - | ||
| 250 | - TrackingPageBrowseUtils.TrackingPageBrowseExposureEnd('','',TrackParamConvert.pageInfoBean_ParamType(this.pageInfoBean)) | ||
| 251 | } | 245 | } |
| 252 | 246 | ||
| 253 | build() { | 247 | build() { |
| @@ -259,11 +253,12 @@ export struct MorningEveningPaperComponent { | @@ -259,11 +253,12 @@ export struct MorningEveningPaperComponent { | ||
| 259 | topicInfoView({ frontLinkObject: this.pageInfoBean?.topicInfo?.frontLinkObject }) | 253 | topicInfoView({ frontLinkObject: this.pageInfoBean?.topicInfo?.frontLinkObject }) |
| 260 | } | 254 | } |
| 261 | 255 | ||
| 262 | - if (this.audioPlayUrl.length > 0){ | ||
| 263 | - ListItem() { | ||
| 264 | - this.AudioBarView(this.simpleAudioDialog) | ||
| 265 | - } | ||
| 266 | - } | 256 | + //暂时不展示音频播报 |
| 257 | + // if (this.audioPlayUrl.length > 0){ | ||
| 258 | + // ListItem() { | ||
| 259 | + // this.AudioBarView(this.simpleAudioDialog) | ||
| 260 | + // } | ||
| 261 | + // } | ||
| 267 | } | 262 | } |
| 268 | 263 | ||
| 269 | ListItem() { | 264 | ListItem() { |
| @@ -84,36 +84,74 @@ export struct CardMediaInfo { | @@ -84,36 +84,74 @@ export struct CardMediaInfo { | ||
| 84 | // liveInfo.liveState 直播新闻-直播状态 wait待开播running直播中end已结束cancel已取消paused暂停 | 84 | // liveInfo.liveState 直播新闻-直播状态 wait待开播running直播中end已结束cancel已取消paused暂停 |
| 85 | // 显示直播信息 | 85 | // 显示直播信息 |
| 86 | Row() { | 86 | Row() { |
| 87 | - if (this.contentDTO?.liveInfo?.liveState === 'wait') { | ||
| 88 | - Image($r('app.media.card_wait')) | ||
| 89 | - .mediaLogo() | ||
| 90 | - Text('预约') | ||
| 91 | - .mediaText() | ||
| 92 | - } else if (this.contentDTO?.liveInfo?.liveState === 'running') { | ||
| 93 | - LottieView({ | ||
| 94 | - name: 'live_status_wait', | ||
| 95 | - path: "lottie/live_detail_living.json", | ||
| 96 | - lottieWidth: 14, | ||
| 97 | - lottieHeight: 14, | ||
| 98 | - autoplay: true, | ||
| 99 | - loop: true, | 87 | + // 搜索接口没有返回liveInfo字段所以得做个区分 |
| 88 | + if (this.contentDTO && this.contentDTO.liveInfo && JSON.stringify(this.contentDTO.liveInfo) === '{}') { | ||
| 89 | + // 当liveInfo不存在的时候 | ||
| 90 | + if (this.contentDTO?.liveType === 'wait') { | ||
| 91 | + Image($r('app.media.card_wait')) | ||
| 92 | + .mediaLogo() | ||
| 93 | + Text('预约') | ||
| 94 | + .mediaText() | ||
| 95 | + } else if (this.contentDTO?.liveType === 'running') { | ||
| 96 | + LottieView({ | ||
| 97 | + name: 'live_status_wait', | ||
| 98 | + path: "lottie/live_detail_living.json", | ||
| 99 | + lottieWidth: 14, | ||
| 100 | + lottieHeight: 14, | ||
| 101 | + autoplay: true, | ||
| 102 | + loop: true, | ||
| 100 | }) | 103 | }) |
| 101 | - .margin({ | ||
| 102 | - right: '2vp' | 104 | + .margin({ |
| 105 | + right: '2vp' | ||
| 103 | }) | 106 | }) |
| 104 | - // Image($r('app.media.card_live')) | ||
| 105 | - // .mediaLogo() | ||
| 106 | - Text('直播中') | ||
| 107 | - .mediaText() | ||
| 108 | - } else if (this.contentDTO?.liveInfo?.liveState === 'end' && this.contentDTO?.liveInfo?.replayUri) { | ||
| 109 | - Image($r('app.media.card_play')) | ||
| 110 | - .mediaLogo() | ||
| 111 | - Text('回看') | ||
| 112 | - .mediaText() | ||
| 113 | - }else if(this.contentDTO?.liveInfo?.liveState === 'end' && !this.contentDTO?.liveInfo | ||
| 114 | - ?.replayUri){ | 107 | + // Image($r('app.media.card_live')) |
| 108 | + // .mediaLogo() | ||
| 109 | + Text('直播中') | ||
| 110 | + .mediaText() | ||
| 111 | + } else if (this.contentDTO?.liveType === 'end' && this.contentDTO?.linkUrl) { | ||
| 112 | + Image($r('app.media.card_play')) | ||
| 113 | + .mediaLogo() | ||
| 114 | + Text('回看') | ||
| 115 | + .mediaText() | ||
| 116 | + }else if(this.contentDTO?.liveInfo?.liveState === 'end' && !this.contentDTO?.linkUrl){ | ||
| 115 | Text('已结束') | 117 | Text('已结束') |
| 116 | .mediaText() | 118 | .mediaText() |
| 119 | + } | ||
| 120 | + }else { | ||
| 121 | + // 当liveInfo存在时后 | ||
| 122 | + | ||
| 123 | + if (this.contentDTO?.liveInfo?.liveState === 'wait') { | ||
| 124 | + Image($r('app.media.card_wait')) | ||
| 125 | + .mediaLogo() | ||
| 126 | + Text('预约') | ||
| 127 | + .mediaText() | ||
| 128 | + } else if (this.contentDTO?.liveInfo?.liveState === 'running') { | ||
| 129 | + LottieView({ | ||
| 130 | + name: 'live_status_wait', | ||
| 131 | + path: "lottie/live_detail_living.json", | ||
| 132 | + lottieWidth: 14, | ||
| 133 | + lottieHeight: 14, | ||
| 134 | + autoplay: true, | ||
| 135 | + loop: true, | ||
| 136 | + }) | ||
| 137 | + .margin({ | ||
| 138 | + right: '2vp' | ||
| 139 | + }) | ||
| 140 | + // Image($r('app.media.card_live')) | ||
| 141 | + // .mediaLogo() | ||
| 142 | + Text('直播中') | ||
| 143 | + .mediaText() | ||
| 144 | + } else if (this.contentDTO?.liveInfo?.liveState === 'end' && this.contentDTO?.liveInfo?.replayUri) { | ||
| 145 | + Image($r('app.media.card_play')) | ||
| 146 | + .mediaLogo() | ||
| 147 | + Text('回看') | ||
| 148 | + .mediaText() | ||
| 149 | + }else if(this.contentDTO?.liveInfo?.liveState === 'end' && !this.contentDTO?.liveInfo | ||
| 150 | + ?.replayUri){ | ||
| 151 | + Text('已结束') | ||
| 152 | + .mediaText() | ||
| 153 | + } | ||
| 154 | + | ||
| 117 | } | 155 | } |
| 118 | if (!!this.joinPeopleNum) { | 156 | if (!!this.joinPeopleNum) { |
| 119 | Text(' | ') | 157 | Text(' | ') |
| @@ -58,7 +58,6 @@ export struct Card2Component { | @@ -58,7 +58,6 @@ export struct Card2Component { | ||
| 58 | Notes({ objectType: this.contentDTO.objectType }).height(30).align(Alignment.Center) | 58 | Notes({ objectType: this.contentDTO.objectType }).height(30).align(Alignment.Center) |
| 59 | //Notes({ objectType: this.contentDTO.objectType }) | 59 | //Notes({ objectType: this.contentDTO.objectType }) |
| 60 | } | 60 | } |
| 61 | - | ||
| 62 | Text() { | 61 | Text() { |
| 63 | if (this.titleMarked) { | 62 | if (this.titleMarked) { |
| 64 | Span(this.str01) | 63 | Span(this.str01) |
| @@ -9,7 +9,7 @@ | @@ -9,7 +9,7 @@ | ||
| 9 | export struct Notes { | 9 | export struct Notes { |
| 10 | @State objectType: number | string = 5 | 10 | @State objectType: number | string = 5 |
| 11 | @State newTags: string = '' | 11 | @State newTags: string = '' |
| 12 | - | 12 | + @State seoTags: string = '' |
| 13 | build() { | 13 | build() { |
| 14 | if (this.returnTypeTitleFn()) { | 14 | if (this.returnTypeTitleFn()) { |
| 15 | Text(this.returnTypeTitleFn()) | 15 | Text(this.returnTypeTitleFn()) |
| @@ -3,6 +3,9 @@ import { CommonConstants, ConfigConstants, ScreenType } from 'wdConstant'; | @@ -3,6 +3,9 @@ import { CommonConstants, ConfigConstants, ScreenType } from 'wdConstant'; | ||
| 3 | import { Logger, ToastUtils, DateTimeUtils } from 'wdKit'; | 3 | import { Logger, ToastUtils, DateTimeUtils } from 'wdKit'; |
| 4 | import { CompUtils } from '../../utils/CompUtils'; | 4 | import { CompUtils } from '../../utils/CompUtils'; |
| 5 | import { ProcessUtils, WDRouterRule } from 'wdRouter'; | 5 | import { ProcessUtils, WDRouterRule } from 'wdRouter'; |
| 6 | +import { TrackConstants, | ||
| 7 | + TrackingButton, | ||
| 8 | + TrackingContent, TrackingPageBrowse, TrackParamConvert } from 'wdTracking/Index'; | ||
| 6 | 9 | ||
| 7 | const TAG: string = 'CardView'; | 10 | const TAG: string = 'CardView'; |
| 8 | 11 | ||
| @@ -528,6 +531,11 @@ export struct PaperSingleColumn999CardView { | @@ -528,6 +531,11 @@ export struct PaperSingleColumn999CardView { | ||
| 528 | .borderRadius(4) | 531 | .borderRadius(4) |
| 529 | .onClick(() => { | 532 | .onClick(() => { |
| 530 | ProcessUtils.processPage(this.item) | 533 | ProcessUtils.processPage(this.item) |
| 534 | + TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.SummaryType.MorningAndEveningNews,TrackConstants.SummaryType.MorningAndEveningNews,TrackParamConvert.program(this.item)) | ||
| 535 | + }).onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => { | ||
| 536 | + if (isVisible) { | ||
| 537 | + TrackingContent.common(TrackConstants.EventType.Show,TrackConstants.SummaryType.MorningAndEveningNews,TrackConstants.SummaryType.MorningAndEveningNews,TrackParamConvert.program(this.item)) | ||
| 538 | + } | ||
| 531 | }) | 539 | }) |
| 532 | } | 540 | } |
| 533 | 541 |
| @@ -73,13 +73,14 @@ struct EditUserInfoPage { | @@ -73,13 +73,14 @@ struct EditUserInfoPage { | ||
| 73 | .width('30') | 73 | .width('30') |
| 74 | .height('30') | 74 | .height('30') |
| 75 | } | 75 | } |
| 76 | - }.margin({top:20,bottom:-10}) | ||
| 77 | - | ||
| 78 | - Button('点击更换头像') | ||
| 79 | - .fontColor(Color.Gray) | ||
| 80 | - .fontSize(15) | ||
| 81 | - .backgroundColor(Color.White) | ||
| 82 | - .margin(20) | 76 | + }.margin({top:20,bottom:40}) |
| 77 | + | ||
| 78 | + ///目前不支持头像上传,暂时屏蔽 | ||
| 79 | + // Button('点击更换头像') | ||
| 80 | + // .fontColor(Color.Gray) | ||
| 81 | + // .fontSize(15) | ||
| 82 | + // .backgroundColor(Color.White) | ||
| 83 | + // .margin(20) | ||
| 83 | 84 | ||
| 84 | List({}){ | 85 | List({}){ |
| 85 | ForEach(this.listData,(item:EditListInfo,index:number) =>{ | 86 | ForEach(this.listData,(item:EditListInfo,index:number) =>{ |
| @@ -14,7 +14,7 @@ import { CustomPullToRefresh } from '../reusable/CustomPullToRefresh'; | @@ -14,7 +14,7 @@ import { CustomPullToRefresh } from '../reusable/CustomPullToRefresh'; | ||
| 14 | import { MyCustomDialog } from '../reusable/MyCustomDialog' | 14 | import { MyCustomDialog } from '../reusable/MyCustomDialog' |
| 15 | import { NetworkUtil } from 'wdKit/Index'; | 15 | import { NetworkUtil } from 'wdKit/Index'; |
| 16 | import TrackingPageBrowseUtils from '../../utils/TrackingPageBrowseUtils' | 16 | import TrackingPageBrowseUtils from '../../utils/TrackingPageBrowseUtils' |
| 17 | -import { TrackConstants } from 'wdTracking/Index'; | 17 | +import { TrackConstants, TrackingButton, TrackingContent, TrackParamConvert } from 'wdTracking/Index'; |
| 18 | 18 | ||
| 19 | @Entry | 19 | @Entry |
| 20 | @Component | 20 | @Component |
| @@ -36,6 +36,9 @@ struct MyCollectionListPage { | @@ -36,6 +36,9 @@ struct MyCollectionListPage { | ||
| 36 | builder: MyCustomDialog({ | 36 | builder: MyCustomDialog({ |
| 37 | confirm: () => { | 37 | confirm: () => { |
| 38 | this.deleteDatas() | 38 | this.deleteDatas() |
| 39 | + if (this.isAllSelect) { | ||
| 40 | + TrackingButton.click('morning_evening_news_click',TrackConstants.PageName.My_Collect,TrackConstants.PageName.My_Collect) | ||
| 41 | + } | ||
| 39 | }, | 42 | }, |
| 40 | titleShow:false, | 43 | titleShow:false, |
| 41 | tipValue: this.isAllSelect?'是否确认清空?':'确认删除'+this.deleteNum.toString()+'条收藏' | 44 | tipValue: this.isAllSelect?'是否确认清空?':'确认删除'+this.deleteNum.toString()+'条收藏' |
| @@ -146,7 +149,14 @@ struct MyCollectionListPage { | @@ -146,7 +149,14 @@ struct MyCollectionListPage { | ||
| 146 | Column() { | 149 | Column() { |
| 147 | BigPicCardComponent({compDTO:new CompDTO,contentDTO:compDTO}) | 150 | BigPicCardComponent({compDTO:new CompDTO,contentDTO:compDTO}) |
| 148 | } | 151 | } |
| 149 | - } | 152 | + }.onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => { |
| 153 | + if (isVisible) { | ||
| 154 | + TrackingContent.common(TrackConstants.EventType.Show, TrackConstants.PageName.My_Collect,TrackConstants.PageName.My_Collect, TrackParamConvert.program(compDTO)) | ||
| 155 | + } | ||
| 156 | + }) | ||
| 157 | + // .onClick(()=>{ | ||
| 158 | + // TrackingContent.common(TrackConstants.EventType.Click, TrackConstants.PageName.My_Collect,TrackConstants.PageName.My_Collect, TrackParamConvert.program(compDTO)) | ||
| 159 | + // }) | ||
| 150 | } | 160 | } |
| 151 | 161 | ||
| 152 | 162 |
| @@ -8,6 +8,7 @@ import { FirstTabTopSearchComponent } from '../search/FirstTabTopSearchComponent | @@ -8,6 +8,7 @@ import { FirstTabTopSearchComponent } from '../search/FirstTabTopSearchComponent | ||
| 8 | import { AssignChannelParam } from 'wdRouter/src/main/ets/utils/HomeChannelUtils'; | 8 | import { AssignChannelParam } from 'wdRouter/src/main/ets/utils/HomeChannelUtils'; |
| 9 | import { PeopleShipMainComponent } from '../peopleShip/PeopleShipMainComponent'; | 9 | import { PeopleShipMainComponent } from '../peopleShip/PeopleShipMainComponent'; |
| 10 | import { channelSkeleton } from '../skeleton/channelSkeleton'; | 10 | import { channelSkeleton } from '../skeleton/channelSkeleton'; |
| 11 | +import { TrackConstants, TrackingButton } from 'wdTracking/Index'; | ||
| 11 | 12 | ||
| 12 | const TAG = 'TopNavigationComponent'; | 13 | const TAG = 'TopNavigationComponent'; |
| 13 | 14 | ||
| @@ -83,16 +84,16 @@ export struct TopNavigationComponentNew { | @@ -83,16 +84,16 @@ export struct TopNavigationComponentNew { | ||
| 83 | PeopleShipMainComponent({ | 84 | PeopleShipMainComponent({ |
| 84 | currentTopNavSelectedIndex: $currentTopNavSelectedIndex, | 85 | currentTopNavSelectedIndex: $currentTopNavSelectedIndex, |
| 85 | navIndex: index, | 86 | navIndex: index, |
| 86 | - pageId: navItem.pageId + '', | ||
| 87 | - channelId: navItem.channelId + '', | 87 | + pageId: navItem?.pageId + '', |
| 88 | + channelId: navItem?.channelId + '', | ||
| 88 | }) | 89 | }) |
| 89 | } else | 90 | } else |
| 90 | if (!this.isBroadcast(navItem) && !this.isLayout(navItem)) { | 91 | if (!this.isBroadcast(navItem) && !this.isLayout(navItem)) { |
| 91 | PageComponent({ | 92 | PageComponent({ |
| 92 | currentTopNavSelectedIndex: $currentTopNavSelectedIndex, | 93 | currentTopNavSelectedIndex: $currentTopNavSelectedIndex, |
| 93 | navIndex: index, | 94 | navIndex: index, |
| 94 | - pageId: navItem.pageId + '', | ||
| 95 | - channelId: navItem.channelId + '', | 95 | + pageId: navItem?.pageId + '', |
| 96 | + channelId: navItem?.channelId + '', | ||
| 96 | autoRefresh: this.autoRefresh2Page | 97 | autoRefresh: this.autoRefresh2Page |
| 97 | }) | 98 | }) |
| 98 | } else { | 99 | } else { |
| @@ -171,6 +172,7 @@ export struct TopNavigationComponentNew { | @@ -171,6 +172,7 @@ export struct TopNavigationComponentNew { | ||
| 171 | .onClick(() => { | 172 | .onClick(() => { |
| 172 | if (NetworkUtil.isNetConnected()) { | 173 | if (NetworkUtil.isNetConnected()) { |
| 173 | ProcessUtils.gotoMorningEveningPaper() | 174 | ProcessUtils.gotoMorningEveningPaper() |
| 175 | + TrackingButton.click('morning_evening_news_click',TrackConstants.SummaryType.MorningAndEveningNews,TrackConstants.SummaryType.MorningAndEveningNews) | ||
| 174 | } else { | 176 | } else { |
| 175 | ToastUtils.showToast('网络出小差了,请检查网络后重试', 1000) | 177 | ToastUtils.showToast('网络出小差了,请检查网络后重试', 1000) |
| 176 | } | 178 | } |
| @@ -458,7 +458,12 @@ export struct SearchResultContentComponent { | @@ -458,7 +458,12 @@ export struct SearchResultContentComponent { | ||
| 458 | let rmhInfo = this.getRmhInfo(rem,value) | 458 | let rmhInfo = this.getRmhInfo(rem,value) |
| 459 | console.log('获取photos',JSON.stringify(photos)) | 459 | console.log('获取photos',JSON.stringify(photos)) |
| 460 | console.log('获取value2',JSON.stringify(value)) | 460 | console.log('获取value2',JSON.stringify(value)) |
| 461 | + let liveType = value.data?.liveType; | ||
| 462 | + let seoTags = value.data?.seoTags | ||
| 461 | let contentDTO = new ContentDTO(); | 463 | let contentDTO = new ContentDTO(); |
| 464 | + contentDTO.liveType = liveType?liveType: "" | ||
| 465 | + contentDTO.seoTags = seoTags?seoTags: "" | ||
| 466 | + // console.log('获取value333333333',JSON.stringify(contentDTO.liveType)) | ||
| 462 | contentDTO.appStyle = value.data.appStyle + "" | 467 | contentDTO.appStyle = value.data.appStyle + "" |
| 463 | contentDTO.cityCode = value.data.cityCode | 468 | contentDTO.cityCode = value.data.cityCode |
| 464 | contentDTO.coverSize = "" | 469 | contentDTO.coverSize = "" |
| @@ -31,6 +31,7 @@ export struct PermissionDesComponent { | @@ -31,6 +31,7 @@ export struct PermissionDesComponent { | ||
| 31 | .border({ radius: 5 }) | 31 | .border({ radius: 5 }) |
| 32 | .margin({ top: 12 }) | 32 | .margin({ top: 12 }) |
| 33 | .padding(12) | 33 | .padding(12) |
| 34 | + .zIndex(20) | ||
| 34 | } | 35 | } |
| 35 | 36 | ||
| 36 | startDismiss() { | 37 | startDismiss() { |
| @@ -13,6 +13,7 @@ | @@ -13,6 +13,7 @@ | ||
| 13 | "wdKit": "file:../../commons/wdKit", | 13 | "wdKit": "file:../../commons/wdKit", |
| 14 | "wdBean": "file:../../features/wdBean", | 14 | "wdBean": "file:../../features/wdBean", |
| 15 | "wdRouter": "file:../../commons/wdRouter", | 15 | "wdRouter": "file:../../commons/wdRouter", |
| 16 | + "wdTracking": "file:../../features/wdTracking", | ||
| 16 | "wdNetwork": "file:../../commons/wdNetwork" | 17 | "wdNetwork": "file:../../commons/wdNetwork" |
| 17 | } | 18 | } |
| 18 | } | 19 | } |
| @@ -11,6 +11,7 @@ import { notificationManager } from '@kit.NotificationKit'; | @@ -11,6 +11,7 @@ import { notificationManager } from '@kit.NotificationKit'; | ||
| 11 | import { BusinessError } from '@kit.BasicServicesKit'; | 11 | import { BusinessError } from '@kit.BasicServicesKit'; |
| 12 | import { SpConstants } from 'wdConstant/Index'; | 12 | import { SpConstants } from 'wdConstant/Index'; |
| 13 | import { PushContentBean, PushContentParser } from './PushContentParser'; | 13 | import { PushContentBean, PushContentParser } from './PushContentParser'; |
| 14 | +import { ParamType, Tracking } from 'wdTracking/Index'; | ||
| 14 | 15 | ||
| 15 | const TAG = "GetuiPush" | 16 | const TAG = "GetuiPush" |
| 16 | 17 | ||
| @@ -220,6 +221,15 @@ export class GetuiPush { | @@ -220,6 +221,15 @@ export class GetuiPush { | ||
| 220 | this.lastPushContent = undefined | 221 | this.lastPushContent = undefined |
| 221 | } | 222 | } |
| 222 | 223 | ||
| 224 | + private trackingClick(content: PushContentBean) { | ||
| 225 | + let param: ParamType = { | ||
| 226 | + "pushResourceId": "", | ||
| 227 | + "pushTitle": content.notifyTitle || "", | ||
| 228 | + "pushContent": content.notifyContent || "", | ||
| 229 | + } | ||
| 230 | + Tracking.event("push_click", param) | ||
| 231 | + } | ||
| 232 | + | ||
| 223 | private dealWithCmdMessage(result: GTCmdMessage) { | 233 | private dealWithCmdMessage(result: GTCmdMessage) { |
| 224 | let action: Number = result.action; | 234 | let action: Number = result.action; |
| 225 | if (action === PushConst.BIND_ALIAS_RESULT) { | 235 | if (action === PushConst.BIND_ALIAS_RESULT) { |
| @@ -9,6 +9,8 @@ export interface PushContentBean { | @@ -9,6 +9,8 @@ export interface PushContentBean { | ||
| 9 | want?: Want // want参数 (用来在消费时,回执) | 9 | want?: Want // want参数 (用来在消费时,回执) |
| 10 | online: boolean // 解析want,是否为在线消息(在线走的是个推通道,离线走的是华为厂商通道) | 10 | online: boolean // 解析want,是否为在线消息(在线走的是个推通道,离线走的是华为厂商通道) |
| 11 | pushLink?: string // 解析want,对应pushLink参数 | 11 | pushLink?: string // 解析want,对应pushLink参数 |
| 12 | + notifyTitle?: string | ||
| 13 | + notifyContent?: string | ||
| 12 | } | 14 | } |
| 13 | 15 | ||
| 14 | /* | 16 | /* |
| @@ -66,7 +68,9 @@ export class PushContentParser { | @@ -66,7 +68,9 @@ export class PushContentParser { | ||
| 66 | if (want.parameters[PushContentParser.PUSH_PARAM_PUSH_LINK]) { | 68 | if (want.parameters[PushContentParser.PUSH_PARAM_PUSH_LINK]) { |
| 67 | let pushLink = want.parameters[PushContentParser.PUSH_PARAM_PUSH_LINK] as string | 69 | let pushLink = want.parameters[PushContentParser.PUSH_PARAM_PUSH_LINK] as string |
| 68 | return { | 70 | return { |
| 69 | - isPush: true, online: true, pushLink: pushLink, want: want | 71 | + isPush: true, online: true, pushLink: pushLink, want: want, |
| 72 | + notifyTitle: gtData["title"] as string, | ||
| 73 | + notifyContent: gtData["content"] as string, | ||
| 70 | } | 74 | } |
| 71 | } | 75 | } |
| 72 | } | 76 | } |
| @@ -105,7 +109,9 @@ export class PushContentParser { | @@ -105,7 +109,9 @@ export class PushContentParser { | ||
| 105 | if (want.parameters[PushContentParser.PUSH_PARAM_PUSH_LINK]) { | 109 | if (want.parameters[PushContentParser.PUSH_PARAM_PUSH_LINK]) { |
| 106 | let pushLink = want.parameters[PushContentParser.PUSH_PARAM_PUSH_LINK] as string | 110 | let pushLink = want.parameters[PushContentParser.PUSH_PARAM_PUSH_LINK] as string |
| 107 | return { | 111 | return { |
| 108 | - isPush: true, online: false, pushLink: pushLink, want: want | 112 | + isPush: true, online: false, pushLink: pushLink, want: want, |
| 113 | + notifyTitle: want.parameters["title"] as string, | ||
| 114 | + notifyContent: want.parameters["content"] as string, | ||
| 109 | } | 115 | } |
| 110 | } | 116 | } |
| 111 | } | 117 | } |
| @@ -6,6 +6,7 @@ import { BusinessError } from '@kit.BasicServicesKit' | @@ -6,6 +6,7 @@ import { BusinessError } from '@kit.BasicServicesKit' | ||
| 6 | import { Logger, ToastUtils, CustomToast, EmitterUtils, EmitterEventId } from 'wdKit/Index' | 6 | import { Logger, ToastUtils, CustomToast, EmitterUtils, EmitterEventId } from 'wdKit/Index' |
| 7 | import { LoginViewModel } from './LoginViewModel' | 7 | import { LoginViewModel } from './LoginViewModel' |
| 8 | import {InterestsHobbiesModel} from '../../../../../../../products/phone/src/main/ets/pages/viewModel/InterestsHobbiesModel' | 8 | import {InterestsHobbiesModel} from '../../../../../../../products/phone/src/main/ets/pages/viewModel/InterestsHobbiesModel' |
| 9 | +import { TrackConstants, TrackingButton, TrackingPageBrowse } from 'wdTracking/Index' | ||
| 9 | 10 | ||
| 10 | const TAG = "OneKeyLoginPage" | 11 | const TAG = "OneKeyLoginPage" |
| 11 | 12 | ||
| @@ -28,10 +29,35 @@ struct OneKeyLoginPage { | @@ -28,10 +29,35 @@ struct OneKeyLoginPage { | ||
| 28 | maskColor:"#00000000" | 29 | maskColor:"#00000000" |
| 29 | }) | 30 | }) |
| 30 | 31 | ||
| 32 | + // 埋点计算页面浏览时长 | ||
| 33 | + private pageStartDate: number = 0 | ||
| 34 | + private pageName = TrackConstants.PageName.OneClick_Login | ||
| 35 | + | ||
| 31 | aboutToAppear(): void { | 36 | aboutToAppear(): void { |
| 32 | this.anonymousPhone = HuaweiAuth.sharedInstance().anonymousPhone||"" | 37 | this.anonymousPhone = HuaweiAuth.sharedInstance().anonymousPhone||"" |
| 33 | } | 38 | } |
| 34 | 39 | ||
| 40 | + onPageShow(): void { | ||
| 41 | + this.pageStartDate = Date.now() | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | + onPageHide(): void { | ||
| 45 | + const duration = (Date.now() - this.pageStartDate!) | ||
| 46 | + TrackingPageBrowse.trackCommonPageExposureEnd(this.pageName, this.pageName, duration) | ||
| 47 | + } | ||
| 48 | + | ||
| 49 | + // pageTransition() { | ||
| 50 | + // // 为目标页面时,进入:从右边侧滑入,退出:是右侧划出;跳转别的页面:左侧划出,返回:左侧划入。 | ||
| 51 | + // PageTransitionEnter({ type: RouteType.Push, duration: 300 }) | ||
| 52 | + // .slide(SlideEffect.Right) | ||
| 53 | + // PageTransitionEnter({ type: RouteType.Pop, duration: 300 }) | ||
| 54 | + // .slide(SlideEffect.Left) | ||
| 55 | + // PageTransitionExit({ type: RouteType.Push, duration: 300 }) | ||
| 56 | + // .slide(SlideEffect.Left) | ||
| 57 | + // PageTransitionExit({ type: RouteType.Pop, duration: 300 }) | ||
| 58 | + // .slide(SlideEffect.Right) | ||
| 59 | + // } | ||
| 60 | + | ||
| 35 | build() { | 61 | build() { |
| 36 | Column() { | 62 | Column() { |
| 37 | this.CloseRow() | 63 | this.CloseRow() |
| @@ -39,14 +65,21 @@ struct OneKeyLoginPage { | @@ -39,14 +65,21 @@ struct OneKeyLoginPage { | ||
| 39 | Image($r("app.media.login_logo")) | 65 | Image($r("app.media.login_logo")) |
| 40 | .width(120) | 66 | .width(120) |
| 41 | .height(66) | 67 | .height(66) |
| 42 | - .margin({ top: 78, bottom: 74}) | 68 | + .margin({ top: 34, bottom: 64}) |
| 43 | .align(Alignment.Center) | 69 | .align(Alignment.Center) |
| 44 | 70 | ||
| 45 | Text(this.anonymousPhone) | 71 | Text(this.anonymousPhone) |
| 46 | .fontSize(30) | 72 | .fontSize(30) |
| 47 | .fontWeight(600) | 73 | .fontWeight(600) |
| 48 | .fontColor("#222222") | 74 | .fontColor("#222222") |
| 49 | - .margin({bottom: 10}) | 75 | + .margin({bottom: 12}) |
| 76 | + .align(Alignment.Center) | ||
| 77 | + | ||
| 78 | + Text("华为账号绑定号码") | ||
| 79 | + .fontSize(12) | ||
| 80 | + .fontWeight(400) | ||
| 81 | + .fontColor("#999999") | ||
| 82 | + .margin({bottom: 40}) | ||
| 50 | .align(Alignment.Center) | 83 | .align(Alignment.Center) |
| 51 | 84 | ||
| 52 | this.ProtocolRow() | 85 | this.ProtocolRow() |
| @@ -68,21 +101,26 @@ struct OneKeyLoginPage { | @@ -68,21 +101,26 @@ struct OneKeyLoginPage { | ||
| 68 | if (!this.agreeProtocol) { | 101 | if (!this.agreeProtocol) { |
| 69 | return | 102 | return |
| 70 | } | 103 | } |
| 104 | + | ||
| 105 | + TrackingButton.click("oneClickLoginPageLoginButton", this.pageName, this.pageName) | ||
| 71 | this.requestLogin() | 106 | this.requestLogin() |
| 72 | }) | 107 | }) |
| 73 | } | 108 | } |
| 74 | .padding({ left: 25, right: 25 }) | 109 | .padding({ left: 25, right: 25 }) |
| 75 | - .margin({top: 15}) | 110 | + .margin({top: 20}) |
| 76 | 111 | ||
| 77 | Button("账号密码登录") | 112 | Button("账号密码登录") |
| 78 | .type(ButtonType.Normal) | 113 | .type(ButtonType.Normal) |
| 79 | .align(Alignment.Center) | 114 | .align(Alignment.Center) |
| 80 | .foregroundColor("#666666") | 115 | .foregroundColor("#666666") |
| 81 | .backgroundColor(Color.White) | 116 | .backgroundColor(Color.White) |
| 117 | + .height(26) | ||
| 118 | + .margin({top: 20}) | ||
| 82 | .onClick((event) => { | 119 | .onClick((event) => { |
| 83 | router.replaceUrl({url: WDRouterPage.loginPage.url()}) | 120 | router.replaceUrl({url: WDRouterPage.loginPage.url()}) |
| 84 | }) | 121 | }) |
| 85 | } | 122 | } |
| 123 | + .backgroundColor("#FFFFFF") | ||
| 86 | } | 124 | } |
| 87 | 125 | ||
| 88 | @Builder ProtocolRow() { | 126 | @Builder ProtocolRow() { |
| @@ -126,8 +164,9 @@ struct OneKeyLoginPage { | @@ -126,8 +164,9 @@ struct OneKeyLoginPage { | ||
| 126 | .width(24) | 164 | .width(24) |
| 127 | .height(24) | 165 | .height(24) |
| 128 | .onClick(() => router.back()) | 166 | .onClick(() => router.back()) |
| 129 | - }.margin({ top: 15, right: 15 }) | 167 | + }.margin({ top: 10, right: 16 }) |
| 130 | .width("100%") | 168 | .width("100%") |
| 169 | + .height(44) | ||
| 131 | } | 170 | } |
| 132 | 171 | ||
| 133 | async requestLogin() { | 172 | async requestLogin() { |
| 1 | import { MorningEveningPaperComponent } from 'wdComponent'; | 1 | import { MorningEveningPaperComponent } from 'wdComponent'; |
| 2 | -import { Logger, WindowModel } from 'wdKit'; | 2 | +import { DateTimeUtils, Logger, WindowModel } from 'wdKit'; |
| 3 | +import { TrackConstants, TrackingPageBrowse} from 'wdTracking/Index'; | ||
| 3 | 4 | ||
| 4 | const TAG = 'MorningEveningPaperPage'; | 5 | const TAG = 'MorningEveningPaperPage'; |
| 5 | 6 | ||
| @@ -7,6 +8,8 @@ const TAG = 'MorningEveningPaperPage'; | @@ -7,6 +8,8 @@ const TAG = 'MorningEveningPaperPage'; | ||
| 7 | @Component | 8 | @Component |
| 8 | struct MorningEveningPaperPage { | 9 | struct MorningEveningPaperPage { |
| 9 | @State isPageShow: boolean = false | 10 | @State isPageShow: boolean = false |
| 11 | + pageShowTime:number = 0; | ||
| 12 | + pageHideTime:number = 0; | ||
| 10 | build() { | 13 | build() { |
| 11 | Column() { | 14 | Column() { |
| 12 | MorningEveningPaperComponent() | 15 | MorningEveningPaperComponent() |
| @@ -43,6 +46,7 @@ struct MorningEveningPaperPage { | @@ -43,6 +46,7 @@ struct MorningEveningPaperPage { | ||
| 43 | WindowModel.shared.setWindowLayoutFullScreen(true) | 46 | WindowModel.shared.setWindowLayoutFullScreen(true) |
| 44 | WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', }) | 47 | WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', }) |
| 45 | } | 48 | } |
| 49 | + this.pageShowTime = DateTimeUtils.getTimeStamp() | ||
| 46 | } | 50 | } |
| 47 | 51 | ||
| 48 | onPageHide() { | 52 | onPageHide() { |
| @@ -50,6 +54,12 @@ struct MorningEveningPaperPage { | @@ -50,6 +54,12 @@ struct MorningEveningPaperPage { | ||
| 50 | WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', }) | 54 | WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', }) |
| 51 | this.isPageShow = true | 55 | this.isPageShow = true |
| 52 | Logger.info(TAG, 'onPageHide'); | 56 | Logger.info(TAG, 'onPageHide'); |
| 57 | + | ||
| 58 | + //早晚报埋点 | ||
| 59 | + this.pageHideTime = DateTimeUtils.getTimeStamp() | ||
| 60 | + let duration = 0 | ||
| 61 | + duration = Math.floor((this.pageHideTime - this.pageShowTime)/1000) | ||
| 62 | + TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.SummaryType.MorningAndEveningNews,TrackConstants.SummaryType.MorningAndEveningNews,duration) | ||
| 53 | } | 63 | } |
| 54 | 64 | ||
| 55 | onBackPress() { | 65 | onBackPress() { |
| 1 | import { DeviceUtil, DisplayUtils, UpgradeTipContent } from 'wdKit/Index' | 1 | import { DeviceUtil, DisplayUtils, UpgradeTipContent } from 'wdKit/Index' |
| 2 | +import { TrackConstants, TrackingButton } from 'wdTracking/Index' | ||
| 2 | 3 | ||
| 3 | @Preview | 4 | @Preview |
| 4 | @CustomDialog | 5 | @CustomDialog |
| @@ -35,6 +36,8 @@ export struct UpgradeTipDialog { | @@ -35,6 +36,8 @@ export struct UpgradeTipDialog { | ||
| 35 | .margin({top: 24}) | 36 | .margin({top: 24}) |
| 36 | .onClick(() => { | 37 | .onClick(() => { |
| 37 | this.controller.close() | 38 | this.controller.close() |
| 39 | + | ||
| 40 | + TrackingButton.click("notUpdatedTemporarily", TrackConstants.PageName.Update, TrackConstants.PageName.Update) | ||
| 38 | if (this.cancel) { | 41 | if (this.cancel) { |
| 39 | this.cancel() | 42 | this.cancel() |
| 40 | } | 43 | } |
| @@ -88,6 +91,8 @@ export struct UpgradeTipDialog { | @@ -88,6 +91,8 @@ export struct UpgradeTipDialog { | ||
| 88 | }) | 91 | }) |
| 89 | .onClick(() => { | 92 | .onClick(() => { |
| 90 | this.controller.close() | 93 | this.controller.close() |
| 94 | + | ||
| 95 | + TrackingButton.click("immediateUpdating", TrackConstants.PageName.Update, TrackConstants.PageName.Update) | ||
| 91 | if (this.confirm) { | 96 | if (this.confirm) { |
| 92 | this.confirm() | 97 | this.confirm() |
| 93 | } | 98 | } |
-
Please register or login to post a comment