Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
yangchenggong1_wd
2024-05-25 14:59:16 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
50473a59273ef81e0b995b7518ca0b8cac580fa1
50473a59
1 parent
88b34dbb
desc:埋点[个人主页(主态),个人主页(客态) - 内容曝光,内容点击]
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
80 additions
and
7 deletions
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/ChildCommentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/HomePageBottomCommentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/OtherHomePageBottomCommentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/ChildCommentComponent.ets
View file @
50473a5
...
...
@@ -5,6 +5,7 @@ import MinePageDatasModel from '../../../model/MinePageDatasModel'
import { CommentLikeOperationRequestItem } from '../../../viewmodel/CommentLikeOperationRequestItem'
import { CommentListItem } from '../../../viewmodel/CommentListItem'
import measure from '@ohos.measure'
import { TrackingContent, TrackConstants, TrackParamConvert } from 'wdTracking/Index'
@Component
export struct ChildCommentComponent {
...
...
@@ -16,6 +17,7 @@ export struct ChildCommentComponent {
@State isOverLines: boolean = false
@State isOverLinesParent: boolean = false
testText:string = "1,因为读书的人\n是低着头向上看的人\n身处一隅,却能放眼世界\n2,因为读书的人\n总是比不读书的人\n活得有趣一点\n3,因为读书的人\n即使平凡,绝不平庸"
@Link fromPage:number
build() {
Column() {
...
...
@@ -195,11 +197,12 @@ export struct ChildCommentComponent {
}.height('69lpx')
.justifyContent(FlexAlign.Center)
.onClick(() => {
let content = new ContentDTO()
content.objectId = this.data.targetId;
content.relType = this.data.targetRelType + "";
content.relId = this.data.targetRelId;
content.objectType = this.data.targetType + "";
let content = getParams(this.data)
if(this.fromPage === 0 ){
TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.PageName.Main_Personal,TrackConstants.PageName.Main_Personal,TrackParamConvert.program(content))
}else{
TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.PageName.Customer_Personal,TrackConstants.PageName.Customer_Personal,TrackParamConvert.program(content))
}
ProcessUtils.processPage(content)
})
}
...
...
@@ -284,3 +287,20 @@ function textStyle() {
.lineHeight('46lpx')
}
function getParams(item: CommentListItem) : ContentDTO{
let contentDTO = new ContentDTO();
// contentDTO.objectType = item.targetType + ""
// contentDTO.objectId = item.targetId + ""
// contentDTO.newsTitle = item.targetTitle
// contentDTO.channelId =
// contentDTO.rmhPlatform =
contentDTO.objectId = item.targetId;
contentDTO.relType = item.targetRelType + "";
contentDTO.relId = item.targetRelId;
contentDTO.objectType = item.targetType + "";
contentDTO.newsTitle = item.targetTitle
return contentDTO
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/HomePageBottomCommentComponent.ets
View file @
50473a5
...
...
@@ -8,6 +8,8 @@ import { ChildCommentComponent } from './ChildCommentComponent';
import { MineCommentListDetailItem } from '../../../viewmodel/MineCommentListDetailItem';
import { OtherUserCommentLikeStatusRequestItem } from '../../../viewmodel/OtherUserCommentLikeStatusRequestItem';
import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh';
import { ContentDTO } from 'wdBean/Index';
import { TrackingContent, TrackConstants, TrackParamConvert } from 'wdTracking/Index';
const TAG = "HomePageBottomCommentComponent"
...
...
@@ -83,9 +85,15 @@ export struct HomePageBottomCommentComponent {
ChildCommentComponent({
data: item,
levelHead: UserDataLocal.getUserLevelHeaderUrl(),
isLastItem: index === this.data_comment.totalCount() - 1
isLastItem: index === this.data_comment.totalCount() - 1,
fromPage:0
})
}.onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => {
if (isVisible) {
let contentDTO = getParams(item)
TrackingContent.common(TrackConstants.EventType.Show, TrackConstants.PageName.Main_Personal,TrackConstants.PageName.Main_Personal, TrackParamConvert.program(contentDTO))
}
})
}, (item: CommentListItem, index: number) => index.toString())
//没有更多数据 显示提示
...
...
@@ -218,3 +226,22 @@ export struct HomePageBottomCommentComponent {
})
}
}
function getParams(item: CommentListItem) : ContentDTO{
let contentDTO = new ContentDTO();
// contentDTO.objectType = item.targetType + ""
// contentDTO.objectId = item.targetId + ""
// contentDTO.newsTitle = item.targetTitle
// contentDTO.channelId =
// contentDTO.rmhPlatform =
contentDTO.objectId = item.targetId;
contentDTO.relType = item.targetRelType + "";
contentDTO.relId = item.targetRelId;
contentDTO.objectType = item.targetType + "";
contentDTO.newsTitle = item.targetTitle
return contentDTO
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/OtherHomePageBottomCommentComponent.ets
View file @
50473a5
...
...
@@ -8,6 +8,8 @@ import { OtherUserCommentLikeStatusRequestItem } from '../../../viewmodel/OtherU
import { ChildCommentComponent } from './ChildCommentComponent';
import { EmptyComponent } from '../../view/EmptyComponent';
import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh';
import { ContentDTO } from 'wdBean/Index';
import { TrackingContent, TrackConstants, TrackParamConvert } from 'wdTracking/Index';
const TAG = "HomePageBottomComponent"
/**
...
...
@@ -84,9 +86,15 @@ export struct OtherHomePageBottomCommentComponent {
ChildCommentComponent({
data: item,
levelHead: this.levelHead,
isLastItem: index === this.data_comment.totalCount() - 1
isLastItem: index === this.data_comment.totalCount() - 1,
fromPage:1
})
}.onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => {
if (isVisible) {
let contentDTO = getParams(item)
TrackingContent.common(TrackConstants.EventType.Show, TrackConstants.PageName.Customer_Personal,TrackConstants.PageName.Customer_Personal, TrackParamConvert.program(contentDTO))
}
})
}, (item: CommentListItem, index: number) => index.toString())
//没有更多数据 显示提示
...
...
@@ -215,3 +223,21 @@ export struct OtherHomePageBottomCommentComponent {
})
}
}
function getParams(item: CommentListItem) : ContentDTO{
let contentDTO = new ContentDTO();
// contentDTO.objectType = item.targetType + ""
// contentDTO.objectId = item.targetId + ""
// contentDTO.newsTitle = item.targetTitle
// contentDTO.channelId =
// contentDTO.rmhPlatform =
contentDTO.objectId = item.targetId;
contentDTO.relType = item.targetRelType + "";
contentDTO.relId = item.targetRelId;
contentDTO.objectType = item.targetType + "";
contentDTO.newsTitle = item.targetTitle
return contentDTO
}
...
...
Please
register
or
login
to post a comment