王士厅
... ... @@ -130,8 +130,10 @@ export struct CardMediaInfo {
Image($r('app.media.card_image'))
.mediaLogo()
Text(`${this.contentDTO.photoNum}`)
.mediaText()
.mediaTextImgtype()
}
.margin({ left: 80,top: 55})
} else if (this.contentDTO.objectType === '13') {
// 显示音频信息
Row() {
... ... @@ -161,8 +163,17 @@ export struct CardMediaInfo {
.height(14)
.margin({ right: 3 })
}
@Styles
mediaLogo2() {
.width(14)
.height(14)
.margin({ top:5,right:5 })
}
}
@Extend(Text)
function mediaText() {
.fontColor($r('app.color.color_fff'))
... ... @@ -173,4 +184,15 @@ function mediaText() {
color: 'rgba(0,0,0,0.3)',
offsetY: 2
})
}
\ No newline at end of file
}
@Extend(Text)
function mediaTextImgtype() {
.fontColor($r('app.color.color_fff'))
.fontSize($r('app.float.font_size_13'))
.lineHeight(18)
.textShadow({
radius: 2,
color: 'rgba(0,0,0,0.3)',
offsetY: 2
})
}
... ...
... ... @@ -202,7 +202,7 @@ struct CarouselLayout01CardView {
Blank()
// 文本信息
Stack() {
if (this.item.objectType == '5') {
if (this.item.objectType == '5' || this.item.objectType == '6') {
Notes({ objectType: this.item.objectType })
}
Text(`${this.item.corner}${this.item.newsTitle}`)
... ...
... ... @@ -6,6 +6,8 @@ import { MessageItem } from '../../../viewmodel/MessageItem'
import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh'
import { CustomTitleUI } from '../../reusable/CustomTitleUI'
import { MessageListItemUI } from './MessageListItemUI'
import {TrackingButton,TrackConstants}from 'wdTracking/Index'
import TrackingPageBrowseUtils from '../../../utils/TrackingPageBrowseUtils'
const TAG = "MessageListUI"
... ... @@ -185,6 +187,7 @@ export struct MessageListUI {
}
.padding({ left: "31lpx", right: "31lpx" })
.onClick(() => {
this.messageCenterCommonButtonTracking(index)
switch (index) {
case 0: //互动消息
if(item.unReadCount > 0){
... ... @@ -210,6 +213,25 @@ export struct MessageListUI {
}
}
messageCenterCommonButtonTracking(index:number){
let buttonName:string = ''
switch (index) {
case 0: //互动消息
buttonName = 'myNotificationPageInteractiveMessage'
break;
case 1: //预约消息
buttonName = 'myNotificationPageAppointmentMessage'
break;
case 2: //历史推送
buttonName = 'myNotificationPageHistoricalPush'
break;
case 3: //系统消息
buttonName = 'myNotificationPageSystemMessage'
break;
}
TrackingButton.click(buttonName,TrackConstants.PageName.My_Notification,TrackConstants.PageName.My_Notification)
}
sendEnterEvent(type:number){
MinePageDatasModel.sendEnterMessageData(type).then((value) => {
... ...
... ... @@ -6,6 +6,8 @@ import { WDRouterPage, WDRouterRule } from 'wdRouter';
import {AreaPickerDialog} from '../view/areaPickerDialog/AreaPickerDialog'
import { AreaListModel } from '../../model/AreaListModel';
import router from '@ohos.router';
import TrackingPageBrowseUtils from '../../utils/TrackingPageBrowseUtils'
import { TrackConstants } from 'wdTracking/Index';
@Entry
@Component
... ... @@ -37,6 +39,11 @@ struct EditUserInfoPage {
onPageShow(){
this.updateUserNameAndIntroduction()
TrackingPageBrowseUtils.TrackingPageBrowseExposureStart()
}
onPageHide(): void {
TrackingPageBrowseUtils.TrackingPageBrowseExposureEnd(TrackConstants.PageName.Edit_Information,TrackConstants.PageName.Edit_Information)
}
build() {
... ...
... ... @@ -13,6 +13,8 @@ import { contentListItemParams } from '../../model/MyCollectionModel';
import { CustomPullToRefresh } from '../reusable/CustomPullToRefresh';
import { MyCustomDialog } from '../reusable/MyCustomDialog'
import { NetworkUtil } from 'wdKit/Index';
import TrackingPageBrowseUtils from '../../utils/TrackingPageBrowseUtils'
import { TrackConstants } from 'wdTracking/Index';
@Entry
@Component
... ... @@ -45,6 +47,15 @@ struct MyCollectionListPage {
aboutToAppear(){
this.getData()
}
onPageShow(){
TrackingPageBrowseUtils.TrackingPageBrowseExposureStart()
}
onPageHide(): void {
TrackingPageBrowseUtils.TrackingPageBrowseExposureEnd(TrackConstants.PageName.My_Collect,TrackConstants.PageName.My_Collect)
}
build() {
... ...
... ... @@ -8,6 +8,7 @@ import { FirstTabTopSearchComponent } from '../search/FirstTabTopSearchComponent
import { AssignChannelParam } from 'wdRouter/src/main/ets/utils/HomeChannelUtils';
import { PeopleShipMainComponent } from '../peopleShip/PeopleShipMainComponent';
import { channelSkeleton } from '../skeleton/channelSkeleton';
import { TrackingButton, TrackConstants } from 'wdTracking/Index';
const TAG = 'TopNavigationComponent';
... ... @@ -367,6 +368,7 @@ export struct TopNavigationComponent {
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.Center)
.onClick(() => {
TrackingButton.click("", TrackConstants.PageName.Search, "PEOPLE")
WDRouterRule.jumpWithPage(WDRouterPage.searchPage)
})
}
... ...
... ... @@ -6,6 +6,7 @@
*/
import { SPHelper } from 'wdKit/Index'
import { WDRouterPage, WDRouterRule } from 'wdRouter'
import { TrackingButton, TrackConstants } from 'wdTracking/Index'
import DailyPaperTopicModel from '../../model/DailyPaperTopicModel'
import SearcherAboutDataModel from '../../model/SearcherAboutDataModel'
... ... @@ -77,6 +78,7 @@ export struct FirstTabTopSearchComponent {
.backgroundImage($r('app.media.background_search'))
.backgroundImageSize(ImageSize.Cover)
.onClick(() => {
TrackingButton.click("", TrackConstants.PageName.Search, "NEWS")
WDRouterRule.jumpWithPage(WDRouterPage.searchPage)
})
}
... ...
... ... @@ -7,7 +7,7 @@ import { HomePageBottomFollowComponent } from '../components/mine/home/HomePageB
import MinePageDatasModel from '../model/MinePageDatasModel';
import { EmptyComponent } from '../components/view/EmptyComponent';
import { CustomTitleUI } from '../components/reusable/CustomTitleUI';
import { TrackingPageBrowse, TrackConstants } from 'wdTracking/Index';
import { TrackingPageBrowse, TrackConstants, TrackingButton } from 'wdTracking/Index';
const TAG = "MineHomePage"
... ... @@ -454,6 +454,9 @@ struct MineHomePage {
}, 1000);
//route 跳转写这里 TODO
WDRouterRule.jumpWithPage(WDRouterPage.editUserInfoPage)
//编辑资料只有个人主页
TrackingButton.click('mainPersonalHomePageEditorialMaterial',TrackConstants.PageName.Main_Personal,TrackConstants.PageName.Main_Personal)
}
}
getUserInfo(){
... ...
import { MessageListUI } from '../components/mine/message/MessageListUI';
import {TrackConstants}from 'wdTracking/Index'
import TrackingPageBrowseUtils from '../utils/TrackingPageBrowseUtils'
@Entry
@Component
struct MineMessagePage {
onPageShow(): void {
TrackingPageBrowseUtils.TrackingPageBrowseExposureStart()
}
onPageHide(): void {
TrackingPageBrowseUtils.TrackingPageBrowseExposureEnd(TrackConstants.PageName.My_Notification,TrackConstants.PageName.My_Notification)
}
build() {
Column(){
MessageListUI()
... ...
... ... @@ -34,8 +34,7 @@ export function viewBlogInsightIntentShare(context: common.UIAbilityContext, ent
intentVersion: '1.0.1',
identifier,
intentActionInfo: {
actionMode,
currentPercentage: 50,
actionMode
//目前不考虑发生时段
// executedTimeSlots: {
// executedEndTime: new Date().getTime(),
... ... @@ -91,8 +90,7 @@ export function viewBlogItemInsightIntentShare(context: common.UIAbilityContext,
intentVersion: '1.0.1',
identifier,
intentActionInfo: {
actionMode: ActionMode.EXECUTED,
currentPercentage: 50,
actionMode: ActionMode.EXECUTED
},
intentEntityInfo: {
entityName: 'Blog',
... ... @@ -138,8 +136,7 @@ export function viewColumInsightIntentShare(context: common.UIAbilityContext, en
intentVersion: '1.0.1',
identifier: generateUUID(),
intentActionInfo: {
actionMode: ActionMode.EXECUTED,
currentPercentage: 50,
actionMode: ActionMode.EXECUTED
},
intentEntityInfo: {
entityName: 'Column',
... ...
import { DateTimeUtils } from 'wdKit/Index';
import { ParamType, TrackingPageBrowse } from 'wdTracking/Index';
class TrackingPageBrowseUtils {
private static instance: TrackingPageBrowseUtils
pageShowTime:number = 0;
pageHideTime:number = 0;
/**
* 单例模式
* @returns
*/
public static getInstance(): TrackingPageBrowseUtils {
if (!TrackingPageBrowseUtils.instance) {
TrackingPageBrowseUtils.instance = new TrackingPageBrowseUtils();
}
return TrackingPageBrowseUtils.instance;
}
TrackingPageBrowseExposureStart(){
this.pageShowTime = DateTimeUtils.getTimeStamp()
}
TrackingPageBrowseExposureEnd(pageId: string, pageName: string,extParams?: ParamType){
this.pageHideTime = DateTimeUtils.getTimeStamp()
let duration = 0
duration = Math.floor((this.pageHideTime - this.pageShowTime)/1000)
TrackingPageBrowse.trackCommonPageExposureEnd(pageId,pageName,duration,extParams)
}
}
const pageBrowseUtils = TrackingPageBrowseUtils.getInstance();
export default pageBrowseUtils as TrackingPageBrowseUtils
\ No newline at end of file
... ...
... ... @@ -33,8 +33,8 @@ export struct DetailPlayLiveCommon {
this.relId = params?.extra?.relId || '';
this.relType = params?.extra?.relType || '';
this.contentId = params?.contentID || '';
await this.getContentDetail()
this.getLiveDetails()
this.getContentDetail()
}
build() {
... ... @@ -55,8 +55,8 @@ export struct DetailPlayLiveCommon {
/**
* 查询视频详情用于评论展示
*/
async getContentDetail() {
await this.liveViewModel.getContentDetail(this.contentId, this.relId, this.relType)
getContentDetail() {
this.liveViewModel.getContentDetail(this.contentId, this.relId, this.relType)
.then((data: Array<ContentDetailDTO>) => {
console.log(TAG, '查询视频详情用于评论展示 getContentDetail:', JSON.stringify(data))
if (data) {
... ... @@ -72,6 +72,8 @@ export struct DetailPlayLiveCommon {
this.publishCommentModel.targetType = String(this.contentDetailData?.newsType || '')
this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment || '')
this.publishCommentModel.commentContent = ''
this.getLiveDetails()
// }
}
})
... ...
import { CompInfoBean, ContentDetailDTO, ContentDTO, PageInfoDTO } from 'wdBean/Index';
import { CompInfoBean, ContentDetailDTO, ContentDTO, PageInfoBean, PageInfoDTO } from 'wdBean/Index';
import { ParamType } from './PublicParams';
import { TrackConstants } from './TrackConstants';
import { TrackingUtils } from './TrackingUtils';
export class TrackParamConvert {
... ... @@ -70,7 +71,7 @@ export class TrackParamConvert {
return param
}
private static appendRecommend(detail: ContentDetailDTO, to: ParamType) {
private static appendRecommend(detail: object, to: ParamType) {
//TODO: ContentDetailDTO 增加推荐字段
... ... @@ -85,4 +86,42 @@ export class TrackParamConvert {
/// 这里填写默认值,后续在action=browse时,再重写
to["duration"] = 0
}
///早晚报 专题
static pageInfoBean_ParamType(pageInfo: PageInfoBean) : ParamType {
let topTypeString: string = '';
switch (pageInfo.topicInfo.topicType){
case 21:
topTypeString = TrackConstants.SummaryType.Article
break;
case 22:
topTypeString = TrackConstants.SummaryType.Audio
break;
case 23:
topTypeString = TrackConstants.SummaryType.Live
break;
case 24:
topTypeString = TrackConstants.SummaryType.Talk
break;
case 25:
topTypeString = TrackConstants.SummaryType.MorningAndEveningNews
break;
case 26:
topTypeString = TrackConstants.SummaryType.TimeAxis
break;
}
let param: ParamType = {
"summaryId": pageInfo.topicInfo.topicId,
"summaryType": topTypeString,
"specialLink": pageInfo.topicInfo.shareUrl,
"channelSourceId": pageInfo.name,
"pageId": 'summaryDetailPage',
}
TrackParamConvert.appendRecommend(pageInfo, param)
return param
}
}
\ No newline at end of file
... ...
... ... @@ -4,12 +4,8 @@ import { WDRouterPage } from 'wdRouter';
import { Logger, SPHelper } from 'wdKit/Index';
import { SpConstants } from 'wdConstant/Index';
import LaunchDataModel from '../viewModel/LaunchDataModel'
import { LaunchModel } from '../viewModel/LaunchModel';
import { ifaa } from '@kit.OnlineAuthenticationKit';
import common from '@ohos.app.ability.common';
import Want from '@ohos.app.ability.Want';
import { BusinessError } from '@ohos.base';
import { ParamType, TrackConstants, TrackingButton, TrackingContent } from 'wdTracking/Index';
@Entry
... ... @@ -18,6 +14,7 @@ struct LaunchAdvertisingPage {
@State time: number = 4
timer :number = -1
@State model : LaunchDataModel = {} as LaunchDataModel
pageParam: ParamType = {}
enter() {
... ... @@ -29,7 +26,6 @@ struct LaunchAdvertisingPage {
}
aboutToAppear(): void {
let dataModelStr : string = SPHelper.default.getSync(SpConstants.APP_LAUNCH_PAGE_DATA_MODEL,'') as string
let dataModel : LaunchDataModel = JSON.parse(dataModelStr)
this.model = dataModel
... ... @@ -38,7 +34,9 @@ struct LaunchAdvertisingPage {
//设置倒计时时间
this.time = this.model.launchAdInfo[0].displayDuration
}
this.contentTrackingDict()
this.trackingLaunchShow()
}
... ... @@ -96,6 +94,7 @@ struct LaunchAdvertisingPage {
.backgroundColor('#80000000')
.onClick(() => {
this.enter()
this.trackingLaunchJumpOver()
})
}
.width('100%')
... ... @@ -176,13 +175,15 @@ struct LaunchAdvertisingPage {
action(){
//跳转 url linkUrl https://news.bjd.com.cn/2024/03/19/10724331.shtml
// openType 端外 端内 打开
///埋点
this.trackingLaunchClick()
if(this.model.launchAdInfo.length){
if (this.model.launchAdInfo[0].matInfo.openType == '2') {
//端外打开
ProcessUtils.jumpExternalWebPage(this.model.launchAdInfo[0].matInfo.linkUrl)
//clearInterval(this.timer)
}else {
//端内打开
ProcessUtils.gotoDefaultWebPage(this.model.launchAdInfo[0].matInfo.linkUrl)
... ... @@ -192,6 +193,25 @@ struct LaunchAdvertisingPage {
}
}
contentTrackingDict(){
this.pageParam = {
'adType':'0',
'adId':this.model.launchAdInfo[0].matInfo.id.toString(),
'adName':this.model.launchAdInfo[0].matInfo.advTitle,
'regionName':'0'
}
}
trackingLaunchJumpOver(){
TrackingButton.click('skip_click',TrackConstants.PageName.Open_Screen,TrackConstants.PageName.Open_Screen)
}
trackingLaunchShow(){
TrackingContent.common(TrackConstants.EventType.Show,TrackConstants.PageName.Open_Screen,TrackConstants.PageName.Open_Screen,this.pageParam)
}
trackingLaunchClick(){
TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.PageName.Open_Screen,TrackConstants.PageName.Open_Screen,this.pageParam)
}
}
\ No newline at end of file
... ...
... ... @@ -7,6 +7,7 @@ import { VideoChannelDetail } from 'wdDetailPlayShortVideo/Index';
import { WDRouterPage, WDRouterRule } from 'wdRouter';
import { DisplayDirection } from 'wdConstant/Index';
import { PageComponent } from 'wdComponent/Index';
import { TrackingButton, TrackConstants } from 'wdTracking/Index';
const TAG = 'VideoChannelPage'
... ... @@ -124,6 +125,7 @@ export struct VideoChannelPage {
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.Center)
.onClick(() => {
TrackingButton.click("", TrackConstants.PageName.Search, "VIDEOS")
WDRouterRule.jumpWithPage(WDRouterPage.searchPage)
})
.backgroundColor(Color.Transparent)
... ...
... ... @@ -26,6 +26,7 @@ export interface NetLayerLauncherADMaterialModel{
matType : string //1 video 其他 image
startStyle : number // 1 WDDisplayStyle_Full 全屏样式 其他 WDDisplayStyle_Logo 底部logo样式
advTitle : string
id:number
matImageUrl : string[] //取firstObject
matVideoUrl : string
... ...