Showing
1 changed file
with
23 additions
and
2 deletions
| @@ -5,9 +5,11 @@ import { MineAppointmentItem } from '../../../viewmodel/MineAppointmentItem'; | @@ -5,9 +5,11 @@ import { MineAppointmentItem } from '../../../viewmodel/MineAppointmentItem'; | ||
| 5 | import { LazyDataSource, StringUtils } from 'wdKit'; | 5 | import { LazyDataSource, StringUtils } from 'wdKit'; |
| 6 | import MinePageDatasModel from '../../../model/MinePageDatasModel'; | 6 | import MinePageDatasModel from '../../../model/MinePageDatasModel'; |
| 7 | import { EmptyComponent } from '../../view/EmptyComponent'; | 7 | import { EmptyComponent } from '../../view/EmptyComponent'; |
| 8 | -import { Action } from 'wdBean/Index'; | 8 | +import { Action, ContentDTO } from 'wdBean/Index'; |
| 9 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; | 9 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; |
| 10 | import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh'; | 10 | import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh'; |
| 11 | +import { TrackingContent, TrackConstants, TrackParamConvert, ParamType } from 'wdTracking/Index'; | ||
| 12 | +import { TrackingUtils } from 'wdTracking/src/main/ets/common/TrackingUtils'; | ||
| 11 | 13 | ||
| 12 | const TAG = "AppointmentListUI" | 14 | const TAG = "AppointmentListUI" |
| 13 | 15 | ||
| @@ -77,7 +79,9 @@ export struct AppointmentListUI { | @@ -77,7 +79,9 @@ export struct AppointmentListUI { | ||
| 77 | AppointmentListChildComponent({ item: item }) | 79 | AppointmentListChildComponent({ item: item }) |
| 78 | } | 80 | } |
| 79 | .onClick(() => { | 81 | .onClick(() => { |
| 80 | - //TODO 跳转 | 82 | + let contentDTO = getParams(item) |
| 83 | + TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.PageName.My_Saved_Live,TrackConstants.PageName.My_Saved_Live,TrackParamConvert.program(contentDTO)) | ||
| 84 | + | ||
| 81 | let action = { | 85 | let action = { |
| 82 | type:"2", | 86 | type:"2", |
| 83 | params:{ | 87 | params:{ |
| @@ -90,6 +94,12 @@ export struct AppointmentListUI { | @@ -90,6 +94,12 @@ export struct AppointmentListUI { | ||
| 90 | } as Action | 94 | } as Action |
| 91 | WDRouterRule.jumpWithPage(WDRouterPage.detailPlayLiveCommon, action) | 95 | WDRouterRule.jumpWithPage(WDRouterPage.detailPlayLiveCommon, action) |
| 92 | }) | 96 | }) |
| 97 | + .onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => { | ||
| 98 | + if (isVisible) { | ||
| 99 | + let contentDTO = getParams(item) | ||
| 100 | + TrackingContent.common(TrackConstants.EventType.Show, TrackConstants.PageName.My_Saved_Live,TrackConstants.PageName.My_Saved_Live, TrackParamConvert.program(contentDTO)) | ||
| 101 | + } | ||
| 102 | + }) | ||
| 93 | }, (item: MineAppointmentItem, index: number) => index.toString()) | 103 | }, (item: MineAppointmentItem, index: number) => index.toString()) |
| 94 | 104 | ||
| 95 | //没有更多数据 显示提示 | 105 | //没有更多数据 显示提示 |
| @@ -176,3 +186,14 @@ export struct AppointmentListUI { | @@ -176,3 +186,14 @@ export struct AppointmentListUI { | ||
| 176 | return dealData | 186 | return dealData |
| 177 | } | 187 | } |
| 178 | } | 188 | } |
| 189 | + | ||
| 190 | + function getParams(item: MineAppointmentItem) : ContentDTO{ | ||
| 191 | + let contentDTO = new ContentDTO(); | ||
| 192 | + | ||
| 193 | + contentDTO.objectType = item.relType + "" | ||
| 194 | + contentDTO.objectId = item.liveId + "" | ||
| 195 | + contentDTO.newsTitle = item.title | ||
| 196 | + // contentDTO.channelId = | ||
| 197 | + // contentDTO.rmhPlatform | ||
| 198 | + return contentDTO | ||
| 199 | + } |
-
Please register or login to post a comment