Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool
Showing
16 changed files
with
197 additions
and
25 deletions
| @@ -130,8 +130,10 @@ export struct CardMediaInfo { | @@ -130,8 +130,10 @@ export struct CardMediaInfo { | ||
| 130 | Image($r('app.media.card_image')) | 130 | Image($r('app.media.card_image')) |
| 131 | .mediaLogo() | 131 | .mediaLogo() |
| 132 | Text(`${this.contentDTO.photoNum}`) | 132 | Text(`${this.contentDTO.photoNum}`) |
| 133 | - .mediaText() | 133 | + .mediaTextImgtype() |
| 134 | } | 134 | } |
| 135 | + .margin({ left: 80,top: 55}) | ||
| 136 | + | ||
| 135 | } else if (this.contentDTO.objectType === '13') { | 137 | } else if (this.contentDTO.objectType === '13') { |
| 136 | // 显示音频信息 | 138 | // 显示音频信息 |
| 137 | Row() { | 139 | Row() { |
| @@ -161,8 +163,17 @@ export struct CardMediaInfo { | @@ -161,8 +163,17 @@ export struct CardMediaInfo { | ||
| 161 | .height(14) | 163 | .height(14) |
| 162 | .margin({ right: 3 }) | 164 | .margin({ right: 3 }) |
| 163 | } | 165 | } |
| 166 | + @Styles | ||
| 167 | + mediaLogo2() { | ||
| 168 | + .width(14) | ||
| 169 | + .height(14) | ||
| 170 | + .margin({ top:5,right:5 }) | ||
| 171 | + } | ||
| 172 | + | ||
| 164 | } | 173 | } |
| 165 | 174 | ||
| 175 | + | ||
| 176 | + | ||
| 166 | @Extend(Text) | 177 | @Extend(Text) |
| 167 | function mediaText() { | 178 | function mediaText() { |
| 168 | .fontColor($r('app.color.color_fff')) | 179 | .fontColor($r('app.color.color_fff')) |
| @@ -173,4 +184,15 @@ function mediaText() { | @@ -173,4 +184,15 @@ function mediaText() { | ||
| 173 | color: 'rgba(0,0,0,0.3)', | 184 | color: 'rgba(0,0,0,0.3)', |
| 174 | offsetY: 2 | 185 | offsetY: 2 |
| 175 | }) | 186 | }) |
| 176 | -} | ||
| 187 | +} | ||
| 188 | +@Extend(Text) | ||
| 189 | +function mediaTextImgtype() { | ||
| 190 | + .fontColor($r('app.color.color_fff')) | ||
| 191 | + .fontSize($r('app.float.font_size_13')) | ||
| 192 | + .lineHeight(18) | ||
| 193 | + .textShadow({ | ||
| 194 | + radius: 2, | ||
| 195 | + color: 'rgba(0,0,0,0.3)', | ||
| 196 | + offsetY: 2 | ||
| 197 | + }) | ||
| 198 | +} |
| @@ -202,7 +202,7 @@ struct CarouselLayout01CardView { | @@ -202,7 +202,7 @@ struct CarouselLayout01CardView { | ||
| 202 | Blank() | 202 | Blank() |
| 203 | // 文本信息 | 203 | // 文本信息 |
| 204 | Stack() { | 204 | Stack() { |
| 205 | - if (this.item.objectType == '5') { | 205 | + if (this.item.objectType == '5' || this.item.objectType == '6') { |
| 206 | Notes({ objectType: this.item.objectType }) | 206 | Notes({ objectType: this.item.objectType }) |
| 207 | } | 207 | } |
| 208 | Text(`${this.item.corner}${this.item.newsTitle}`) | 208 | Text(`${this.item.corner}${this.item.newsTitle}`) |
| @@ -6,6 +6,8 @@ import { MessageItem } from '../../../viewmodel/MessageItem' | @@ -6,6 +6,8 @@ import { MessageItem } from '../../../viewmodel/MessageItem' | ||
| 6 | import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh' | 6 | import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh' |
| 7 | import { CustomTitleUI } from '../../reusable/CustomTitleUI' | 7 | import { CustomTitleUI } from '../../reusable/CustomTitleUI' |
| 8 | import { MessageListItemUI } from './MessageListItemUI' | 8 | import { MessageListItemUI } from './MessageListItemUI' |
| 9 | +import {TrackingButton,TrackConstants}from 'wdTracking/Index' | ||
| 10 | +import TrackingPageBrowseUtils from '../../../utils/TrackingPageBrowseUtils' | ||
| 9 | 11 | ||
| 10 | const TAG = "MessageListUI" | 12 | const TAG = "MessageListUI" |
| 11 | 13 | ||
| @@ -185,6 +187,7 @@ export struct MessageListUI { | @@ -185,6 +187,7 @@ export struct MessageListUI { | ||
| 185 | } | 187 | } |
| 186 | .padding({ left: "31lpx", right: "31lpx" }) | 188 | .padding({ left: "31lpx", right: "31lpx" }) |
| 187 | .onClick(() => { | 189 | .onClick(() => { |
| 190 | + this.messageCenterCommonButtonTracking(index) | ||
| 188 | switch (index) { | 191 | switch (index) { |
| 189 | case 0: //互动消息 | 192 | case 0: //互动消息 |
| 190 | if(item.unReadCount > 0){ | 193 | if(item.unReadCount > 0){ |
| @@ -210,6 +213,25 @@ export struct MessageListUI { | @@ -210,6 +213,25 @@ export struct MessageListUI { | ||
| 210 | } | 213 | } |
| 211 | } | 214 | } |
| 212 | 215 | ||
| 216 | + messageCenterCommonButtonTracking(index:number){ | ||
| 217 | + let buttonName:string = '' | ||
| 218 | + switch (index) { | ||
| 219 | + case 0: //互动消息 | ||
| 220 | + buttonName = 'myNotificationPageInteractiveMessage' | ||
| 221 | + break; | ||
| 222 | + case 1: //预约消息 | ||
| 223 | + buttonName = 'myNotificationPageAppointmentMessage' | ||
| 224 | + break; | ||
| 225 | + case 2: //历史推送 | ||
| 226 | + buttonName = 'myNotificationPageHistoricalPush' | ||
| 227 | + break; | ||
| 228 | + case 3: //系统消息 | ||
| 229 | + buttonName = 'myNotificationPageSystemMessage' | ||
| 230 | + break; | ||
| 231 | + } | ||
| 232 | + | ||
| 233 | + TrackingButton.click(buttonName,TrackConstants.PageName.My_Notification,TrackConstants.PageName.My_Notification) | ||
| 234 | + } | ||
| 213 | 235 | ||
| 214 | sendEnterEvent(type:number){ | 236 | sendEnterEvent(type:number){ |
| 215 | MinePageDatasModel.sendEnterMessageData(type).then((value) => { | 237 | MinePageDatasModel.sendEnterMessageData(type).then((value) => { |
| @@ -6,6 +6,8 @@ import { WDRouterPage, WDRouterRule } from 'wdRouter'; | @@ -6,6 +6,8 @@ import { WDRouterPage, WDRouterRule } from 'wdRouter'; | ||
| 6 | import {AreaPickerDialog} from '../view/areaPickerDialog/AreaPickerDialog' | 6 | import {AreaPickerDialog} from '../view/areaPickerDialog/AreaPickerDialog' |
| 7 | import { AreaListModel } from '../../model/AreaListModel'; | 7 | import { AreaListModel } from '../../model/AreaListModel'; |
| 8 | import router from '@ohos.router'; | 8 | import router from '@ohos.router'; |
| 9 | +import TrackingPageBrowseUtils from '../../utils/TrackingPageBrowseUtils' | ||
| 10 | +import { TrackConstants } from 'wdTracking/Index'; | ||
| 9 | 11 | ||
| 10 | @Entry | 12 | @Entry |
| 11 | @Component | 13 | @Component |
| @@ -37,6 +39,11 @@ struct EditUserInfoPage { | @@ -37,6 +39,11 @@ struct EditUserInfoPage { | ||
| 37 | 39 | ||
| 38 | onPageShow(){ | 40 | onPageShow(){ |
| 39 | this.updateUserNameAndIntroduction() | 41 | this.updateUserNameAndIntroduction() |
| 42 | + TrackingPageBrowseUtils.TrackingPageBrowseExposureStart() | ||
| 43 | + } | ||
| 44 | + | ||
| 45 | + onPageHide(): void { | ||
| 46 | + TrackingPageBrowseUtils.TrackingPageBrowseExposureEnd(TrackConstants.PageName.Edit_Information,TrackConstants.PageName.Edit_Information) | ||
| 40 | } | 47 | } |
| 41 | 48 | ||
| 42 | build() { | 49 | build() { |
| @@ -13,6 +13,8 @@ import { contentListItemParams } from '../../model/MyCollectionModel'; | @@ -13,6 +13,8 @@ import { contentListItemParams } from '../../model/MyCollectionModel'; | ||
| 13 | import { CustomPullToRefresh } from '../reusable/CustomPullToRefresh'; | 13 | 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' | ||
| 17 | +import { TrackConstants } from 'wdTracking/Index'; | ||
| 16 | 18 | ||
| 17 | @Entry | 19 | @Entry |
| 18 | @Component | 20 | @Component |
| @@ -45,6 +47,15 @@ struct MyCollectionListPage { | @@ -45,6 +47,15 @@ struct MyCollectionListPage { | ||
| 45 | 47 | ||
| 46 | aboutToAppear(){ | 48 | aboutToAppear(){ |
| 47 | this.getData() | 49 | this.getData() |
| 50 | + | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + onPageShow(){ | ||
| 54 | + TrackingPageBrowseUtils.TrackingPageBrowseExposureStart() | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + onPageHide(): void { | ||
| 58 | + TrackingPageBrowseUtils.TrackingPageBrowseExposureEnd(TrackConstants.PageName.My_Collect,TrackConstants.PageName.My_Collect) | ||
| 48 | } | 59 | } |
| 49 | 60 | ||
| 50 | build() { | 61 | build() { |
| @@ -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 { TrackingButton, TrackConstants } from 'wdTracking/Index'; | ||
| 11 | 12 | ||
| 12 | const TAG = 'TopNavigationComponent'; | 13 | const TAG = 'TopNavigationComponent'; |
| 13 | 14 | ||
| @@ -367,6 +368,7 @@ export struct TopNavigationComponent { | @@ -367,6 +368,7 @@ export struct TopNavigationComponent { | ||
| 367 | .alignItems(VerticalAlign.Center) | 368 | .alignItems(VerticalAlign.Center) |
| 368 | .justifyContent(FlexAlign.Center) | 369 | .justifyContent(FlexAlign.Center) |
| 369 | .onClick(() => { | 370 | .onClick(() => { |
| 371 | + TrackingButton.click("", TrackConstants.PageName.Search, "PEOPLE") | ||
| 370 | WDRouterRule.jumpWithPage(WDRouterPage.searchPage) | 372 | WDRouterRule.jumpWithPage(WDRouterPage.searchPage) |
| 371 | }) | 373 | }) |
| 372 | } | 374 | } |
| @@ -6,6 +6,7 @@ | @@ -6,6 +6,7 @@ | ||
| 6 | */ | 6 | */ |
| 7 | import { SPHelper } from 'wdKit/Index' | 7 | import { SPHelper } from 'wdKit/Index' |
| 8 | import { WDRouterPage, WDRouterRule } from 'wdRouter' | 8 | import { WDRouterPage, WDRouterRule } from 'wdRouter' |
| 9 | +import { TrackingButton, TrackConstants } from 'wdTracking/Index' | ||
| 9 | import DailyPaperTopicModel from '../../model/DailyPaperTopicModel' | 10 | import DailyPaperTopicModel from '../../model/DailyPaperTopicModel' |
| 10 | import SearcherAboutDataModel from '../../model/SearcherAboutDataModel' | 11 | import SearcherAboutDataModel from '../../model/SearcherAboutDataModel' |
| 11 | 12 | ||
| @@ -77,6 +78,7 @@ export struct FirstTabTopSearchComponent { | @@ -77,6 +78,7 @@ export struct FirstTabTopSearchComponent { | ||
| 77 | .backgroundImage($r('app.media.background_search')) | 78 | .backgroundImage($r('app.media.background_search')) |
| 78 | .backgroundImageSize(ImageSize.Cover) | 79 | .backgroundImageSize(ImageSize.Cover) |
| 79 | .onClick(() => { | 80 | .onClick(() => { |
| 81 | + TrackingButton.click("", TrackConstants.PageName.Search, "NEWS") | ||
| 80 | WDRouterRule.jumpWithPage(WDRouterPage.searchPage) | 82 | WDRouterRule.jumpWithPage(WDRouterPage.searchPage) |
| 81 | }) | 83 | }) |
| 82 | } | 84 | } |
| @@ -7,7 +7,7 @@ import { HomePageBottomFollowComponent } from '../components/mine/home/HomePageB | @@ -7,7 +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 | +import { TrackingPageBrowse, TrackConstants, TrackingButton } from 'wdTracking/Index'; |
| 11 | 11 | ||
| 12 | const TAG = "MineHomePage" | 12 | const TAG = "MineHomePage" |
| 13 | 13 | ||
| @@ -454,6 +454,9 @@ struct MineHomePage { | @@ -454,6 +454,9 @@ struct MineHomePage { | ||
| 454 | }, 1000); | 454 | }, 1000); |
| 455 | //route 跳转写这里 TODO | 455 | //route 跳转写这里 TODO |
| 456 | WDRouterRule.jumpWithPage(WDRouterPage.editUserInfoPage) | 456 | WDRouterRule.jumpWithPage(WDRouterPage.editUserInfoPage) |
| 457 | + | ||
| 458 | + //编辑资料只有个人主页 | ||
| 459 | + TrackingButton.click('mainPersonalHomePageEditorialMaterial',TrackConstants.PageName.Main_Personal,TrackConstants.PageName.Main_Personal) | ||
| 457 | } | 460 | } |
| 458 | } | 461 | } |
| 459 | getUserInfo(){ | 462 | getUserInfo(){ |
| 1 | import { MessageListUI } from '../components/mine/message/MessageListUI'; | 1 | import { MessageListUI } from '../components/mine/message/MessageListUI'; |
| 2 | - | 2 | +import {TrackConstants}from 'wdTracking/Index' |
| 3 | +import TrackingPageBrowseUtils from '../utils/TrackingPageBrowseUtils' | ||
| 3 | @Entry | 4 | @Entry |
| 4 | @Component | 5 | @Component |
| 5 | struct MineMessagePage { | 6 | struct MineMessagePage { |
| 6 | 7 | ||
| 8 | + onPageShow(): void { | ||
| 9 | + TrackingPageBrowseUtils.TrackingPageBrowseExposureStart() | ||
| 10 | + } | ||
| 11 | + | ||
| 12 | + onPageHide(): void { | ||
| 13 | + TrackingPageBrowseUtils.TrackingPageBrowseExposureEnd(TrackConstants.PageName.My_Notification,TrackConstants.PageName.My_Notification) | ||
| 14 | + } | ||
| 15 | + | ||
| 7 | build() { | 16 | build() { |
| 8 | Column(){ | 17 | Column(){ |
| 9 | MessageListUI() | 18 | MessageListUI() |
| @@ -34,8 +34,7 @@ export function viewBlogInsightIntentShare(context: common.UIAbilityContext, ent | @@ -34,8 +34,7 @@ export function viewBlogInsightIntentShare(context: common.UIAbilityContext, ent | ||
| 34 | intentVersion: '1.0.1', | 34 | intentVersion: '1.0.1', |
| 35 | identifier, | 35 | identifier, |
| 36 | intentActionInfo: { | 36 | intentActionInfo: { |
| 37 | - actionMode, | ||
| 38 | - currentPercentage: 50, | 37 | + actionMode |
| 39 | //目前不考虑发生时段 | 38 | //目前不考虑发生时段 |
| 40 | // executedTimeSlots: { | 39 | // executedTimeSlots: { |
| 41 | // executedEndTime: new Date().getTime(), | 40 | // executedEndTime: new Date().getTime(), |
| @@ -91,8 +90,7 @@ export function viewBlogItemInsightIntentShare(context: common.UIAbilityContext, | @@ -91,8 +90,7 @@ export function viewBlogItemInsightIntentShare(context: common.UIAbilityContext, | ||
| 91 | intentVersion: '1.0.1', | 90 | intentVersion: '1.0.1', |
| 92 | identifier, | 91 | identifier, |
| 93 | intentActionInfo: { | 92 | intentActionInfo: { |
| 94 | - actionMode: ActionMode.EXECUTED, | ||
| 95 | - currentPercentage: 50, | 93 | + actionMode: ActionMode.EXECUTED |
| 96 | }, | 94 | }, |
| 97 | intentEntityInfo: { | 95 | intentEntityInfo: { |
| 98 | entityName: 'Blog', | 96 | entityName: 'Blog', |
| @@ -138,8 +136,7 @@ export function viewColumInsightIntentShare(context: common.UIAbilityContext, en | @@ -138,8 +136,7 @@ export function viewColumInsightIntentShare(context: common.UIAbilityContext, en | ||
| 138 | intentVersion: '1.0.1', | 136 | intentVersion: '1.0.1', |
| 139 | identifier: generateUUID(), | 137 | identifier: generateUUID(), |
| 140 | intentActionInfo: { | 138 | intentActionInfo: { |
| 141 | - actionMode: ActionMode.EXECUTED, | ||
| 142 | - currentPercentage: 50, | 139 | + actionMode: ActionMode.EXECUTED |
| 143 | }, | 140 | }, |
| 144 | intentEntityInfo: { | 141 | intentEntityInfo: { |
| 145 | entityName: 'Column', | 142 | entityName: 'Column', |
| 1 | +import { DateTimeUtils } from 'wdKit/Index'; | ||
| 2 | +import { ParamType, TrackingPageBrowse } from 'wdTracking/Index'; | ||
| 3 | + | ||
| 4 | +class TrackingPageBrowseUtils { | ||
| 5 | + private static instance: TrackingPageBrowseUtils | ||
| 6 | + pageShowTime:number = 0; | ||
| 7 | + pageHideTime:number = 0; | ||
| 8 | + | ||
| 9 | + /** | ||
| 10 | + * 单例模式 | ||
| 11 | + * @returns | ||
| 12 | + */ | ||
| 13 | + public static getInstance(): TrackingPageBrowseUtils { | ||
| 14 | + if (!TrackingPageBrowseUtils.instance) { | ||
| 15 | + TrackingPageBrowseUtils.instance = new TrackingPageBrowseUtils(); | ||
| 16 | + } | ||
| 17 | + return TrackingPageBrowseUtils.instance; | ||
| 18 | + } | ||
| 19 | + | ||
| 20 | + TrackingPageBrowseExposureStart(){ | ||
| 21 | + this.pageShowTime = DateTimeUtils.getTimeStamp() | ||
| 22 | + } | ||
| 23 | + | ||
| 24 | + TrackingPageBrowseExposureEnd(pageId: string, pageName: string,extParams?: ParamType){ | ||
| 25 | + this.pageHideTime = DateTimeUtils.getTimeStamp() | ||
| 26 | + let duration = 0 | ||
| 27 | + duration = Math.floor((this.pageHideTime - this.pageShowTime)/1000) | ||
| 28 | + TrackingPageBrowse.trackCommonPageExposureEnd(pageId,pageName,duration,extParams) | ||
| 29 | + } | ||
| 30 | +} | ||
| 31 | + | ||
| 32 | +const pageBrowseUtils = TrackingPageBrowseUtils.getInstance(); | ||
| 33 | +export default pageBrowseUtils as TrackingPageBrowseUtils |
| @@ -33,8 +33,8 @@ export struct DetailPlayLiveCommon { | @@ -33,8 +33,8 @@ export struct DetailPlayLiveCommon { | ||
| 33 | this.relId = params?.extra?.relId || ''; | 33 | this.relId = params?.extra?.relId || ''; |
| 34 | this.relType = params?.extra?.relType || ''; | 34 | this.relType = params?.extra?.relType || ''; |
| 35 | this.contentId = params?.contentID || ''; | 35 | this.contentId = params?.contentID || ''; |
| 36 | - await this.getContentDetail() | ||
| 37 | - this.getLiveDetails() | 36 | + this.getContentDetail() |
| 37 | + | ||
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | build() { | 40 | build() { |
| @@ -55,8 +55,8 @@ export struct DetailPlayLiveCommon { | @@ -55,8 +55,8 @@ export struct DetailPlayLiveCommon { | ||
| 55 | /** | 55 | /** |
| 56 | * 查询视频详情用于评论展示 | 56 | * 查询视频详情用于评论展示 |
| 57 | */ | 57 | */ |
| 58 | - async getContentDetail() { | ||
| 59 | - await this.liveViewModel.getContentDetail(this.contentId, this.relId, this.relType) | 58 | + getContentDetail() { |
| 59 | + this.liveViewModel.getContentDetail(this.contentId, this.relId, this.relType) | ||
| 60 | .then((data: Array<ContentDetailDTO>) => { | 60 | .then((data: Array<ContentDetailDTO>) => { |
| 61 | console.log(TAG, '查询视频详情用于评论展示 getContentDetail:', JSON.stringify(data)) | 61 | console.log(TAG, '查询视频详情用于评论展示 getContentDetail:', JSON.stringify(data)) |
| 62 | if (data) { | 62 | if (data) { |
| @@ -72,6 +72,8 @@ export struct DetailPlayLiveCommon { | @@ -72,6 +72,8 @@ export struct DetailPlayLiveCommon { | ||
| 72 | this.publishCommentModel.targetType = String(this.contentDetailData?.newsType || '') | 72 | this.publishCommentModel.targetType = String(this.contentDetailData?.newsType || '') |
| 73 | this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment || '') | 73 | this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment || '') |
| 74 | this.publishCommentModel.commentContent = '' | 74 | this.publishCommentModel.commentContent = '' |
| 75 | + | ||
| 76 | + this.getLiveDetails() | ||
| 75 | // } | 77 | // } |
| 76 | } | 78 | } |
| 77 | }) | 79 | }) |
| 1 | -import { CompInfoBean, ContentDetailDTO, ContentDTO, PageInfoDTO } from 'wdBean/Index'; | 1 | +import { CompInfoBean, ContentDetailDTO, ContentDTO, PageInfoBean, PageInfoDTO } from 'wdBean/Index'; |
| 2 | import { ParamType } from './PublicParams'; | 2 | import { ParamType } from './PublicParams'; |
| 3 | +import { TrackConstants } from './TrackConstants'; | ||
| 3 | import { TrackingUtils } from './TrackingUtils'; | 4 | import { TrackingUtils } from './TrackingUtils'; |
| 4 | 5 | ||
| 5 | export class TrackParamConvert { | 6 | export class TrackParamConvert { |
| @@ -70,7 +71,7 @@ export class TrackParamConvert { | @@ -70,7 +71,7 @@ export class TrackParamConvert { | ||
| 70 | return param | 71 | return param |
| 71 | } | 72 | } |
| 72 | 73 | ||
| 73 | - private static appendRecommend(detail: ContentDetailDTO, to: ParamType) { | 74 | + private static appendRecommend(detail: object, to: ParamType) { |
| 74 | 75 | ||
| 75 | //TODO: ContentDetailDTO 增加推荐字段 | 76 | //TODO: ContentDetailDTO 增加推荐字段 |
| 76 | 77 | ||
| @@ -85,4 +86,42 @@ export class TrackParamConvert { | @@ -85,4 +86,42 @@ export class TrackParamConvert { | ||
| 85 | /// 这里填写默认值,后续在action=browse时,再重写 | 86 | /// 这里填写默认值,后续在action=browse时,再重写 |
| 86 | to["duration"] = 0 | 87 | to["duration"] = 0 |
| 87 | } | 88 | } |
| 89 | + | ||
| 90 | + | ||
| 91 | + ///早晚报 专题 | ||
| 92 | + static pageInfoBean_ParamType(pageInfo: PageInfoBean) : ParamType { | ||
| 93 | + | ||
| 94 | + let topTypeString: string = ''; | ||
| 95 | + switch (pageInfo.topicInfo.topicType){ | ||
| 96 | + case 21: | ||
| 97 | + topTypeString = TrackConstants.SummaryType.Article | ||
| 98 | + break; | ||
| 99 | + case 22: | ||
| 100 | + topTypeString = TrackConstants.SummaryType.Audio | ||
| 101 | + break; | ||
| 102 | + case 23: | ||
| 103 | + topTypeString = TrackConstants.SummaryType.Live | ||
| 104 | + break; | ||
| 105 | + case 24: | ||
| 106 | + topTypeString = TrackConstants.SummaryType.Talk | ||
| 107 | + break; | ||
| 108 | + case 25: | ||
| 109 | + topTypeString = TrackConstants.SummaryType.MorningAndEveningNews | ||
| 110 | + break; | ||
| 111 | + case 26: | ||
| 112 | + topTypeString = TrackConstants.SummaryType.TimeAxis | ||
| 113 | + break; | ||
| 114 | + } | ||
| 115 | + | ||
| 116 | + let param: ParamType = { | ||
| 117 | + "summaryId": pageInfo.topicInfo.topicId, | ||
| 118 | + "summaryType": topTypeString, | ||
| 119 | + "specialLink": pageInfo.topicInfo.shareUrl, | ||
| 120 | + "channelSourceId": pageInfo.name, | ||
| 121 | + "pageId": 'summaryDetailPage', | ||
| 122 | + } | ||
| 123 | + TrackParamConvert.appendRecommend(pageInfo, param) | ||
| 124 | + | ||
| 125 | + return param | ||
| 126 | + } | ||
| 88 | } | 127 | } |
| @@ -4,12 +4,8 @@ import { WDRouterPage } from 'wdRouter'; | @@ -4,12 +4,8 @@ import { WDRouterPage } from 'wdRouter'; | ||
| 4 | import { Logger, SPHelper } from 'wdKit/Index'; | 4 | import { Logger, SPHelper } from 'wdKit/Index'; |
| 5 | import { SpConstants } from 'wdConstant/Index'; | 5 | import { SpConstants } from 'wdConstant/Index'; |
| 6 | import LaunchDataModel from '../viewModel/LaunchDataModel' | 6 | import LaunchDataModel from '../viewModel/LaunchDataModel' |
| 7 | -import { LaunchModel } from '../viewModel/LaunchModel'; | ||
| 8 | -import { ifaa } from '@kit.OnlineAuthenticationKit'; | ||
| 9 | 7 | ||
| 10 | -import common from '@ohos.app.ability.common'; | ||
| 11 | -import Want from '@ohos.app.ability.Want'; | ||
| 12 | -import { BusinessError } from '@ohos.base'; | 8 | +import { ParamType, TrackConstants, TrackingButton, TrackingContent } from 'wdTracking/Index'; |
| 13 | 9 | ||
| 14 | 10 | ||
| 15 | @Entry | 11 | @Entry |
| @@ -18,6 +14,7 @@ struct LaunchAdvertisingPage { | @@ -18,6 +14,7 @@ struct LaunchAdvertisingPage { | ||
| 18 | @State time: number = 4 | 14 | @State time: number = 4 |
| 19 | timer :number = -1 | 15 | timer :number = -1 |
| 20 | @State model : LaunchDataModel = {} as LaunchDataModel | 16 | @State model : LaunchDataModel = {} as LaunchDataModel |
| 17 | + pageParam: ParamType = {} | ||
| 21 | 18 | ||
| 22 | 19 | ||
| 23 | enter() { | 20 | enter() { |
| @@ -29,7 +26,6 @@ struct LaunchAdvertisingPage { | @@ -29,7 +26,6 @@ struct LaunchAdvertisingPage { | ||
| 29 | } | 26 | } |
| 30 | 27 | ||
| 31 | aboutToAppear(): void { | 28 | aboutToAppear(): void { |
| 32 | - | ||
| 33 | let dataModelStr : string = SPHelper.default.getSync(SpConstants.APP_LAUNCH_PAGE_DATA_MODEL,'') as string | 29 | let dataModelStr : string = SPHelper.default.getSync(SpConstants.APP_LAUNCH_PAGE_DATA_MODEL,'') as string |
| 34 | let dataModel : LaunchDataModel = JSON.parse(dataModelStr) | 30 | let dataModel : LaunchDataModel = JSON.parse(dataModelStr) |
| 35 | this.model = dataModel | 31 | this.model = dataModel |
| @@ -38,7 +34,9 @@ struct LaunchAdvertisingPage { | @@ -38,7 +34,9 @@ struct LaunchAdvertisingPage { | ||
| 38 | //设置倒计时时间 | 34 | //设置倒计时时间 |
| 39 | this.time = this.model.launchAdInfo[0].displayDuration | 35 | this.time = this.model.launchAdInfo[0].displayDuration |
| 40 | } | 36 | } |
| 37 | + this.contentTrackingDict() | ||
| 41 | 38 | ||
| 39 | + this.trackingLaunchShow() | ||
| 42 | } | 40 | } |
| 43 | 41 | ||
| 44 | 42 | ||
| @@ -96,6 +94,7 @@ struct LaunchAdvertisingPage { | @@ -96,6 +94,7 @@ struct LaunchAdvertisingPage { | ||
| 96 | .backgroundColor('#80000000') | 94 | .backgroundColor('#80000000') |
| 97 | .onClick(() => { | 95 | .onClick(() => { |
| 98 | this.enter() | 96 | this.enter() |
| 97 | + this.trackingLaunchJumpOver() | ||
| 99 | }) | 98 | }) |
| 100 | } | 99 | } |
| 101 | .width('100%') | 100 | .width('100%') |
| @@ -176,13 +175,15 @@ struct LaunchAdvertisingPage { | @@ -176,13 +175,15 @@ struct LaunchAdvertisingPage { | ||
| 176 | action(){ | 175 | action(){ |
| 177 | //跳转 url linkUrl https://news.bjd.com.cn/2024/03/19/10724331.shtml | 176 | //跳转 url linkUrl https://news.bjd.com.cn/2024/03/19/10724331.shtml |
| 178 | // openType 端外 端内 打开 | 177 | // openType 端外 端内 打开 |
| 178 | + | ||
| 179 | + ///埋点 | ||
| 180 | + this.trackingLaunchClick() | ||
| 181 | + | ||
| 179 | if(this.model.launchAdInfo.length){ | 182 | if(this.model.launchAdInfo.length){ |
| 180 | if (this.model.launchAdInfo[0].matInfo.openType == '2') { | 183 | if (this.model.launchAdInfo[0].matInfo.openType == '2') { |
| 181 | //端外打开 | 184 | //端外打开 |
| 182 | - | ||
| 183 | ProcessUtils.jumpExternalWebPage(this.model.launchAdInfo[0].matInfo.linkUrl) | 185 | ProcessUtils.jumpExternalWebPage(this.model.launchAdInfo[0].matInfo.linkUrl) |
| 184 | //clearInterval(this.timer) | 186 | //clearInterval(this.timer) |
| 185 | - | ||
| 186 | }else { | 187 | }else { |
| 187 | //端内打开 | 188 | //端内打开 |
| 188 | ProcessUtils.gotoDefaultWebPage(this.model.launchAdInfo[0].matInfo.linkUrl) | 189 | ProcessUtils.gotoDefaultWebPage(this.model.launchAdInfo[0].matInfo.linkUrl) |
| @@ -192,6 +193,25 @@ struct LaunchAdvertisingPage { | @@ -192,6 +193,25 @@ struct LaunchAdvertisingPage { | ||
| 192 | } | 193 | } |
| 193 | } | 194 | } |
| 194 | 195 | ||
| 196 | + contentTrackingDict(){ | ||
| 197 | + this.pageParam = { | ||
| 198 | + 'adType':'0', | ||
| 199 | + 'adId':this.model.launchAdInfo[0].matInfo.id.toString(), | ||
| 200 | + 'adName':this.model.launchAdInfo[0].matInfo.advTitle, | ||
| 201 | + 'regionName':'0' | ||
| 202 | + } | ||
| 203 | + } | ||
| 204 | + | ||
| 205 | + trackingLaunchJumpOver(){ | ||
| 206 | + TrackingButton.click('skip_click',TrackConstants.PageName.Open_Screen,TrackConstants.PageName.Open_Screen) | ||
| 207 | + } | ||
| 208 | + | ||
| 209 | + trackingLaunchShow(){ | ||
| 210 | + TrackingContent.common(TrackConstants.EventType.Show,TrackConstants.PageName.Open_Screen,TrackConstants.PageName.Open_Screen,this.pageParam) | ||
| 211 | + } | ||
| 195 | 212 | ||
| 213 | + trackingLaunchClick(){ | ||
| 214 | + TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.PageName.Open_Screen,TrackConstants.PageName.Open_Screen,this.pageParam) | ||
| 215 | + } | ||
| 196 | 216 | ||
| 197 | } | 217 | } |
| @@ -7,6 +7,7 @@ import { VideoChannelDetail } from 'wdDetailPlayShortVideo/Index'; | @@ -7,6 +7,7 @@ import { VideoChannelDetail } from 'wdDetailPlayShortVideo/Index'; | ||
| 7 | import { WDRouterPage, WDRouterRule } from 'wdRouter'; | 7 | import { WDRouterPage, WDRouterRule } from 'wdRouter'; |
| 8 | import { DisplayDirection } from 'wdConstant/Index'; | 8 | import { DisplayDirection } from 'wdConstant/Index'; |
| 9 | import { PageComponent } from 'wdComponent/Index'; | 9 | import { PageComponent } from 'wdComponent/Index'; |
| 10 | +import { TrackingButton, TrackConstants } from 'wdTracking/Index'; | ||
| 10 | 11 | ||
| 11 | const TAG = 'VideoChannelPage' | 12 | const TAG = 'VideoChannelPage' |
| 12 | 13 | ||
| @@ -124,6 +125,7 @@ export struct VideoChannelPage { | @@ -124,6 +125,7 @@ export struct VideoChannelPage { | ||
| 124 | .alignItems(VerticalAlign.Center) | 125 | .alignItems(VerticalAlign.Center) |
| 125 | .justifyContent(FlexAlign.Center) | 126 | .justifyContent(FlexAlign.Center) |
| 126 | .onClick(() => { | 127 | .onClick(() => { |
| 128 | + TrackingButton.click("", TrackConstants.PageName.Search, "VIDEOS") | ||
| 127 | WDRouterRule.jumpWithPage(WDRouterPage.searchPage) | 129 | WDRouterRule.jumpWithPage(WDRouterPage.searchPage) |
| 128 | }) | 130 | }) |
| 129 | .backgroundColor(Color.Transparent) | 131 | .backgroundColor(Color.Transparent) |
| @@ -26,6 +26,7 @@ export interface NetLayerLauncherADMaterialModel{ | @@ -26,6 +26,7 @@ export interface NetLayerLauncherADMaterialModel{ | ||
| 26 | matType : string //1 video 其他 image | 26 | matType : string //1 video 其他 image |
| 27 | startStyle : number // 1 WDDisplayStyle_Full 全屏样式 其他 WDDisplayStyle_Logo 底部logo样式 | 27 | startStyle : number // 1 WDDisplayStyle_Full 全屏样式 其他 WDDisplayStyle_Logo 底部logo样式 |
| 28 | advTitle : string | 28 | advTitle : string |
| 29 | + id:number | ||
| 29 | matImageUrl : string[] //取firstObject | 30 | matImageUrl : string[] //取firstObject |
| 30 | matVideoUrl : string | 31 | matVideoUrl : string |
| 31 | 32 |
-
Please register or login to post a comment