yangchenggong1_wd

desc:埋点[预约列表(我的) - 内容曝光,内容点击]

... ... @@ -5,9 +5,11 @@ import { MineAppointmentItem } from '../../../viewmodel/MineAppointmentItem';
import { LazyDataSource, StringUtils } from 'wdKit';
import MinePageDatasModel from '../../../model/MinePageDatasModel';
import { EmptyComponent } from '../../view/EmptyComponent';
import { Action } from 'wdBean/Index';
import { Action, ContentDTO } from 'wdBean/Index';
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh';
import { TrackingContent, TrackConstants, TrackParamConvert, ParamType } from 'wdTracking/Index';
import { TrackingUtils } from 'wdTracking/src/main/ets/common/TrackingUtils';
const TAG = "AppointmentListUI"
... ... @@ -77,7 +79,9 @@ export struct AppointmentListUI {
AppointmentListChildComponent({ item: item })
}
.onClick(() => {
//TODO 跳转
let contentDTO = getParams(item)
TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.PageName.My_Saved_Live,TrackConstants.PageName.My_Saved_Live,TrackParamConvert.program(contentDTO))
let action = {
type:"2",
params:{
... ... @@ -90,6 +94,12 @@ export struct AppointmentListUI {
} as Action
WDRouterRule.jumpWithPage(WDRouterPage.detailPlayLiveCommon, action)
})
.onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => {
if (isVisible) {
let contentDTO = getParams(item)
TrackingContent.common(TrackConstants.EventType.Show, TrackConstants.PageName.My_Saved_Live,TrackConstants.PageName.My_Saved_Live, TrackParamConvert.program(contentDTO))
}
})
}, (item: MineAppointmentItem, index: number) => index.toString())
//没有更多数据 显示提示
... ... @@ -175,4 +185,15 @@ export struct AppointmentListUI {
console.log(TAG, JSON.stringify(dealData))
return dealData
}
}
\ No newline at end of file
}
function getParams(item: MineAppointmentItem) : ContentDTO{
let contentDTO = new ContentDTO();
contentDTO.objectType = item.relType + ""
contentDTO.objectId = item.liveId + ""
contentDTO.newsTitle = item.title
// contentDTO.channelId =
// contentDTO.rmhPlatform
return contentDTO
}
\ No newline at end of file
... ...