zhanglun_wd

直播预约埋点

1 -import { CompDTO, ContentDTO, Params, Action, ReserveItemBean} from 'wdBean'; 1 +import { CompDTO, ContentDTO, Params, Action, ReserveItemBean, PageTrackBean} from 'wdBean';
2 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; 2 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
3 import { postInteractAccentionOperateParams } from 'wdBean'; 3 import { postInteractAccentionOperateParams } from 'wdBean';
4 import { PageRepository } from '../../repository/PageRepository'; 4 import { PageRepository } from '../../repository/PageRepository';
@@ -268,7 +268,29 @@ export struct ZhSingleRow03 { @@ -268,7 +268,29 @@ export struct ZhSingleRow03 {
268 .textAlign(TextAlign.Center) 268 .textAlign(TextAlign.Center)
269 .borderRadius(3) 269 .borderRadius(3)
270 .onClick(() => { 270 .onClick(() => {
271 - this.bookAndCancel(item.relId, item.objectId, !this.isReserved(Number(item.objectId))) 271 +
  272 + const isSubscribe = !this.isReserved(Number(item.objectId))
  273 +
  274 + // 直播预约埋点
  275 + const params: ParamType = {
  276 + 'contentName': item.newsTitle,
  277 + 'contentType': item.objectType,
  278 + "liveStreamType": item?.liveInfo.vrType === 0 ? 1 : 2,
  279 + "vliveId": item.objectId,
  280 + "vliveName": item.newsTitle,
  281 + "contentId": item.objectId,
  282 + "compId": item.relId,
  283 + "contentStyle": item.appStyle,
  284 + "liveType": getLiveState(item),
  285 + 'contentShowChannelId': item.channelId,
  286 + 'linkUrl': item.linkUrl,
  287 + "pageId": this.pageId,
  288 + "pageName": this.pageName,
  289 + }
  290 + Logger.info(TAG, `直播预约埋点: ${JSON.stringify(params)}`);
  291 + Tracking.event(isSubscribe? "live_subscribe_click": "cancel_live_subscribe_click", params)
  292 +
  293 + this.bookAndCancel(item.relId, item.objectId, isSubscribe)
272 }) 294 })
273 295
274 } 296 }