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
xugenyuan
2024-05-31 12:48:02 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
bfa01e55a020d8b8dbb228350586e0acc214c1eb
bfa01e55
1 parent
3507aa01
ref |> 调整有关底部组件相关页面 pageId、pageName埋点用。且已调整评论发布埋点
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
63 additions
and
21 deletions
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentCustomDialog.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentTabComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/QualityCommentsComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/viewmodel/CommentViewModel.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/QualityCommentsPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/LiveOperRowListView.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayLiveCommon.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayLivePage.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerCommentComponent.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailVideoListPage.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/VideoChannelDetail.ets
sight_harmony/products/phone/src/main/ets/pages/ImageAndTextDetailPage.ets
sight_harmony/products/phone/src/main/ets/pages/SpacialTopicPage.ets
sight_harmony/products/phone/src/main/ets/pages/detail/AudioDetail.ets
sight_harmony/products/phone/src/main/ets/pages/detail/DynamicDetailPage.ets
sight_harmony/products/phone/src/main/ets/pages/detail/MultiPictureDetailPage.ets
sight_harmony/products/phone/src/main/ets/pages/view/VideoChannelPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentComponent.ets
View file @
bfa01e5
...
...
@@ -11,6 +11,7 @@ import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
import NoMoreLayout from '../../page/NoMoreLayout';
import { EmptyComponent } from '../../view/EmptyComponent';
import { ContentDetailDTO, Params } from 'wdBean/Index';
import { TrackingContent, TrackParamConvert } from 'wdTracking/Index';
const TAG = 'CommentComponent';
...
...
@@ -31,6 +32,8 @@ export struct CommentComponent {
/*必传*/
@ObjectLink publishCommentModel: publishCommentModel
@Consume contentDetailData: ContentDetailDTO
@Consume pageId: string
@Consume pageName: string
listScroller: ListScroller = new ListScroller(); // scroller控制器
historyOffset: number = 0; // 上次浏览到列表距离顶端的偏移量offset
@State allDatas: LazyDataSource<commentItemModel> = new LazyDataSource();
...
...
@@ -66,6 +69,9 @@ export struct CommentComponent {
this.dialogController = new CustomDialogController({
builder: CommentCustomDialog({
onPublishBtnClickTrack: () => {
TrackingContent.commentClick(this.pageId, this.pageName, TrackParamConvert.contentDetail(this.contentDetailData))
},
confirm: (value: Record<string, string>) => {
this.addCommentLocal()
},
...
...
@@ -222,6 +228,7 @@ export struct CommentComponent {
}
}
}
.scrollBar(BarState.Off)
.margin({ bottom: 10 })
.onReachEnd(() => {
if (!this.fixedHeightMode) {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentCustomDialog.ets
View file @
bfa01e5
...
...
@@ -22,6 +22,7 @@ export struct CommentCustomDialog {
// confirm 表示内部处理调用 内容评论接口 发布了评论并成功,上层只需要 通过 publishCommentModel.lastCommentModel 即可获取最新已提交的评论
confirm?: (value: Record<string, string>) => void
onPublishBtnClickTrack?: () => void // 和confirm配套使用。当设置了onPublishBtnClick 则无效
@State private emojiSwitch: boolean = false
textInputController: TextAreaController = new TextAreaController()
...
...
@@ -39,6 +40,11 @@ export struct CommentCustomDialog {
}
}
// 点击时 即可埋点
if (this.onPublishBtnClickTrack) {
this.onPublishBtnClickTrack()
}
let bean: Record<string, string> = {};
// this.publishCommentModel.commentContent = this.commentText
//TODO 判断类型
...
...
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentTabComponent.ets
View file @
bfa01e5
...
...
@@ -5,6 +5,7 @@ import measure from '@ohos.measure'
import { ContentDetailDTO } from 'wdBean/Index'
import { HttpUtils } from 'wdNetwork/Index'
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'
import { TrackingContent, TrackParamConvert } from 'wdTracking/Index'
@Preview
@Component
...
...
@@ -20,6 +21,8 @@ export struct CommentTabComponent {
@State type: number = 1
@State placeHolder: string = '说两句...'
@State dialogController: CustomDialogController | null = null;
@Consume pageId: string
@Consume pageName: string
styleType: number = 1 //1: 白色背景(图文底部栏) 2: 黑色背景(图集底部栏)
/*回调方法*/
dialogControllerConfirm: () => void = () => {
...
...
@@ -29,6 +32,9 @@ export struct CommentTabComponent {
this.dialogController = new CustomDialogController({
builder: CommentCustomDialog({
onPublishBtnClickTrack: () => {
TrackingContent.commentClick(this.pageId, this.pageName, TrackParamConvert.contentDetail(this.contentDetail))
},
confirm: (value: Record<string, string>) => {
this.dialogControllerConfirm();
EmitterUtils.sendEvent(EmitterEventId.COMMENT_PUBLISH, this.publishCommentModel.targetId)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/QualityCommentsComponent.ets
View file @
bfa01e5
...
...
@@ -11,6 +11,7 @@ import { CommentCustomDialog } from './CommentCustomDialog'
import { publishCommentModel } from '../model/PublishCommentModel'
import { ProcessUtils, WDRouterPage, WDRouterRule } from 'wdRouter/Index'
import { ContentDTO, MasterDetailRes } from 'wdBean/Index'
import { TrackConstants, TrackingContent } from 'wdTracking/Index'
const TAG = 'QualityCommentsComponent';
...
...
@@ -34,6 +35,8 @@ export struct QualityCommentsComponent {
/*必传*/
@State publishCommentModel: publishCommentModel = new publishCommentModel()
// @Consume pageName: string
aboutToDisappear(): void {
// windowClass.setWindowSystemBarProperties({ statusBarColor: '#000' })
this.dialogController = null // 将dialogController置空
...
...
@@ -57,6 +60,9 @@ export struct QualityCommentsComponent {
showAlert() {
this.dialogController = new CustomDialogController({
builder: CommentCustomDialog({
onPublishBtnClickTrack: () => {
//TrackingContent.commentClick(this.pageName, this.pageName,{})
},
confirm: (value: Record<string, string>) => {
},
...
...
sight_harmony/features/wdComponent/src/main/ets/components/comment/viewmodel/CommentViewModel.ets
View file @
bfa01e5
...
...
@@ -189,11 +189,6 @@ class CommentViewModel {
}
HttpRequest.post<ResponseDTO<commentItemModel>>(url, bean).then((data: ResponseDTO<commentItemModel>) => {
// fixme 埋点 评论发布点击
TrackingContent.commentClick(pageId,pageName
,{
'duration':0,
})
if (data.code != 0) {
ToastUtils.showToast(data.message, 1000);
fail()
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/QualityCommentsPage.ets
View file @
bfa01e5
import { WindowModel } from 'wdKit/Index';
import { TrackConstants } from 'wdTracking/Index';
import { QualityCommentsComponent } from '../comment/view/QualityCommentsComponent';
@Entry
@Component
struct QualityCommentsPage {
@Provide pageName: string = TrackConstants.PageName.Best_Comment
@Provide pageId: string = TrackConstants.PageName.Best_Comment
onPageShow(): void {
// WindowModel.shared.setWindowLayoutFullScreen(true)
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/LiveOperRowListView.ets
View file @
bfa01e5
...
...
@@ -11,7 +11,6 @@ import {
import router from '@ohos.router';
import { MultiPictureDetailViewModel } from '../../viewmodel/MultiPictureDetailViewModel';
import { LiveLikeComponent } from './LiveLikeComponent';
import { CommentTabComponent, CommentIconComponent, } from '../comment/view/CommentTabComponent';
import { publishCommentModel } from '../comment/model/PublishCommentModel'
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
import { PageRepository } from '../../repository/PageRepository';
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayLiveCommon.ets
View file @
bfa01e5
...
...
@@ -36,6 +36,8 @@ export struct DetailPlayLiveCommon {
@Provide pageBackPress: number = -1
@Provide contentDetailData: ContentDetailDTO = {} as ContentDetailDTO
@Provide publishCommentModel: publishCommentModel = new publishCommentModel()
@Provide pageId: string = TrackConstants.PageName.Live_Detail
@Provide pageName: string = TrackConstants.PageName.Live_Detail
// 横屏或竖屏 general-竖屏,news-横屏
@State liveLandscape: string = ''
@State isLoading: boolean = false
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayLivePage.ets
View file @
bfa01e5
...
...
@@ -9,7 +9,7 @@ import { router, window } from '@kit.ArkUI';
import { WDAliPlayerController } from 'wdPlayer/Index';
import { LiveOperRowListView } from 'wdComponent';
import { publishCommentModel } from 'wdComponent/src/main/ets/components/comment/model/PublishCommentModel';
import { TrackConstants, TrackingContent } from 'wdTracking/Index';
import { TrackConstants, TrackingContent
, TrackParamConvert
} from 'wdTracking/Index';
let TAG: string = 'DetailPlayLivePage';
...
...
@@ -98,12 +98,9 @@ export struct DetailPlayLivePage {
this.lastInputedChatComment = result
}
// 发布评论埋点
TrackingContent.commentClick(TrackConstants.PageName.DynamicDetail, TrackConstants.PageName.DynamicDetail,
{
'contentType': `${this.contentDetailData.newsType}`,
'contentId': `${this.contentDetailData.newsId}`,
'contentName': `${this.contentDetailData.newsTitle || ''}`,
});
TrackingContent.commentClick(TrackConstants.PageName.Live_Detail,
TrackConstants.PageName.Live_Detail,
TrackParamConvert.contentDetail(this.contentDetailData));
})
}
}
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerCommentComponent.ets
View file @
bfa01e5
...
...
@@ -11,7 +11,7 @@ import { ChartItemCompereComponent } from './ChartItemCompereComponent'
import { ChatItemComponent } from './ChartItemComponent'
import { router } from '@kit.ArkUI'
import { EmitterEventId, EmitterUtils, Logger, SPHelper, WindowModel } from 'wdKit/Index'
import { TrackConstants, TrackingContent } from 'wdTracking/Index'
import { TrackConstants, TrackingContent
, TrackParamConvert
} from 'wdTracking/Index'
const TAG = "PlayerCommentComponent"
/**
...
...
@@ -120,12 +120,9 @@ export struct PlayerCommentComponent {
})
// 发布评论埋点
TrackingContent.commentClick(TrackConstants.PageName.DynamicDetail, TrackConstants.PageName.DynamicDetail,
{
'contentType': `${this.contentDetailData.newsType}`,
'contentId': `${this.contentDetailData.newsId}`,
'contentName': `${this.contentDetailData.newsTitle || ''}`,
});
TrackingContent.commentClick(TrackConstants.PageName.Live_Detail,
TrackConstants.PageName.Live_Detail,
TrackParamConvert.contentDetail(this.contentDetailData));
}
},
onBack: () => {
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailVideoListPage.ets
View file @
bfa01e5
...
...
@@ -31,6 +31,8 @@ export struct DetailVideoListPage {
@Provide switchVideoStatus: boolean = true
@Provide displayDirection: DisplayDirection = DisplayDirection.VERTICAL
@Provide showCommentList: boolean = false
@Provide pageName: string = TrackConstants.PageName.VideoDetail
@Provide pageId: string = TrackConstants.PageName.VideoDetail
@State data: ContentDetailDTO[] = []
@State currentIndex: number = 0
@State netStatus: number | undefined = undefined // 存储网络状态用来展示缺省图
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/VideoChannelDetail.ets
View file @
bfa01e5
...
...
@@ -30,7 +30,8 @@ const storage = LocalStorage.getShared();
@Component
export struct VideoChannelDetail {
private groupId: string = '' // 楼层id
private pageId: string = '' //页面id
@Provide private pageId: string = '' //页面id
@Provide private pageName: string = ''
private pageNum: number = 1
private pageSize: number = 5
private loadStrategy: string = 'first_load' // 首次加载: first_load, 上推刷新: push_up, 下拉刷新: pull_down
...
...
sight_harmony/products/phone/src/main/ets/pages/ImageAndTextDetailPage.ets
View file @
bfa01e5
...
...
@@ -2,6 +2,7 @@ import { Action } from 'wdBean';
import { ImageAndTextPageComponent } from 'wdComponent'
import { Logger } from 'wdKit'
import router from '@ohos.router';
import { TrackConstants } from 'wdTracking/Index';
const TAG = 'ImageAndTextDetailPage';
...
...
@@ -10,6 +11,9 @@ const TAG = 'ImageAndTextDetailPage';
struct ImageAndTextDetailPage {
action: Action = {} as Action
@Provide pageName: string = TrackConstants.PageName.Article_Detail
@Provide pageId: string = TrackConstants.PageName.Article_Detail
build() {
Column() {
ImageAndTextPageComponent({action: this.action})
...
...
sight_harmony/products/phone/src/main/ets/pages/SpacialTopicPage.ets
View file @
bfa01e5
...
...
@@ -3,6 +3,7 @@ import { SpacialTopicPageComponent } from 'wdComponent'
import { CommonConstants } from 'wdConstant'
import { Logger } from 'wdKit'
import router from '@ohos.router';
import { TrackConstants } from 'wdTracking/Index';
const TAG = 'SpacialTopicPage';
...
...
@@ -12,6 +13,10 @@ struct SpacialTopicPage {
@State action: Action = {} as Action
@State reload: number = 0
@State count: number = 0
@Provide pageName: string = TrackConstants.PageName.Summary_Detail
@Provide pageId: string = TrackConstants.PageName.Summary_Detail
build() {
Column() {
SpacialTopicPageComponent({ action: this.action ,reload:this.reload })
...
...
sight_harmony/products/phone/src/main/ets/pages/detail/AudioDetail.ets
View file @
bfa01e5
...
...
@@ -2,6 +2,8 @@ import { Logger } from 'wdKit';
import { AudioDetailComponent } from 'wdComponent';
import router from '@ohos.router';
import { Params, Action } from 'wdBean';
import { TrackConstants } from 'wdTracking/Index';
const TAG = 'AudioDetail';
@Entry
@Component
...
...
@@ -11,6 +13,9 @@ struct AudioDetail {
@State contentId: string = ''
@State relType: string = ''
@Provide pageId: string = TrackConstants.PageName.Audio_Detail
@Provide pageName: string = TrackConstants.PageName.Audio_Detail
build() {
Column() {
AudioDetailComponent({
...
...
sight_harmony/products/phone/src/main/ets/pages/detail/DynamicDetailPage.ets
View file @
bfa01e5
...
...
@@ -13,6 +13,9 @@ struct DynamicDetailPage {
@State contentId: string = ''
@State relType: string = ''
@Provide pageName: string = TrackConstants.PageName.DynamicDetail
@Provide pageId: string = TrackConstants.PageName.DynamicDetail
build() {
Column() {
DynamicDetailComponent({
...
...
sight_harmony/products/phone/src/main/ets/pages/detail/MultiPictureDetailPage.ets
View file @
bfa01e5
...
...
@@ -19,6 +19,8 @@ struct MultiPictureDetailPage {
@State relType: string = ''
pageShowTime:number = 0;
pageHideTime:number = 0;
@Provide pageId: string = TrackConstants.PageName.Atlas_Detail
@Provide pageName: string = TrackConstants.PageName.Atlas_Detail
build() {
Row() {
...
...
sight_harmony/products/phone/src/main/ets/pages/view/VideoChannelPage.ets
View file @
bfa01e5
...
...
@@ -167,6 +167,7 @@ export struct VideoChannelPage {
topNavIndex: $currentTopNavSelectedIndex,
groupId: this.groupId + '',
pageId: item.pageId + '',
pageName: item.name + '',
channelId: item.channelId + '',
autoRefresh: this.autoRefresh,
})
...
...
Please
register
or
login
to post a comment