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
liyubing
2024-05-28 14:16:45 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
35debf24f27b7512c331afca84615ffb463b471d
35debf24
2 parents
21ada8eb
631f9275
Merge remote-tracking branch 'origin/main'
Show whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
164 additions
and
81 deletions
sight_harmony/commons/wdRouter/src/main/ets/utils/ProcessUtils.ets
sight_harmony/features/wdBean/src/main/ets/bean/component/extra/ExtraDTO.ts
sight_harmony/features/wdBean/src/main/ets/bean/content/Params.ts
sight_harmony/features/wdComponent/src/main/ets/components/DynamicDetailComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/ENewspaperItemComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/ENewspaperPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/InteractMessage/InteractMComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/MorningEveningPaperComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/SingleColumn999Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/topicInfoView.ets
sight_harmony/features/wdComponent/src/main/ets/components/SpacialTopicPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card10Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card11Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card2Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card3Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card5Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card6Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card9Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/model/PublishCommentModel.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/viewmodel/CommentViewModel.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/MinePagePersonFunctionUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/CardView.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/MyCollectionListPage.ets
sight_harmony/features/wdComponent/src/main/ets/utils/InsightIntentShare.ets
sight_harmony/features/wdComponent/src/main/resources/base/media/AccountOwner_DefaultIcon.png
sight_harmony/features/wdDetailPlayShortVideo/oh-package.json5
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailVideoListPage.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/VideoChannelDetail.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerRightView.ets
sight_harmony/features/wdTracking/src/main/ets/tracking/TrackingContent.ets
sight_harmony/commons/wdRouter/src/main/ets/utils/ProcessUtils.ets
View file @
35debf2
...
...
@@ -203,6 +203,7 @@ export class ProcessUtils {
relType: content?.relType,
relId: content?.relId,
channelId: content?.channelId,
pageId: content?.pageId
} as ExtraDTO
} as Params,
};
...
...
sight_harmony/features/wdBean/src/main/ets/bean/component/extra/ExtraDTO.ts
View file @
35debf2
...
...
@@ -10,6 +10,7 @@ export interface ExtraDTO extends ItemDTO {
topicId
:
string
;
channelId
:
string
;
compId
:
string
;
pageId
:
string
;
sourcePage
:
string
;
relId
:
string
;
relType
:
string
;
...
...
sight_harmony/features/wdBean/src/main/ets/bean/content/Params.ts
View file @
35debf2
...
...
@@ -25,5 +25,6 @@ export interface Params {
creatorId
?:
string
;
//号主id
videoUrl
?:
string
;
videoCoverUrl
?:
string
;
pageId
?:
string
;
backVisibility
?:
boolean
;
//展示顶部返回栏
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/DynamicDetailComponent.ets
View file @
35debf2
...
...
@@ -601,6 +601,8 @@ export struct DynamicDetailComponent {
this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle || '')
this.publishCommentModel.targetType = String(this.contentDetailData?.newsType || '')
this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment || '')
this.publishCommentModel.pageId = TrackConstants.PageName.DynamicDetail
this.publishCommentModel.pageName = TrackConstants.PageName.DynamicDetail
}
this.operationButtonList = ['comment', 'collect', 'share']
...
...
@@ -680,7 +682,7 @@ export struct DynamicDetailComponent {
//创建跳转信息
makeJumpInfo() {
this.mJumpInfo.pageId =
'dynamicDetailPage'
this.mJumpInfo.pageId =
TrackConstants.PageName.DynamicDetail
this.mJumpInfo.objectId = this.contentDetailData.newsId + ""
this.mJumpInfo.relType = this.contentDetailData.reLInfo?.relType + ""
this.mJumpInfo.relId = this.contentDetailData.reLInfo?.relId + ""
...
...
sight_harmony/features/wdComponent/src/main/ets/components/ENewspaperItemComponent.ets
View file @
35debf2
...
...
@@ -86,7 +86,7 @@ export struct ENewspaperItemComponent {
} as ContentDTO
ProcessUtils.processPage(content)
//内容点击
TrackingContent.c
ommentC
lickWithEvent('current_Number_Panel_content_click',TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage
TrackingContent.clickWithEvent('current_Number_Panel_content_click',TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage
,{
'contentName':this.itemBeanClicked.title,
'contentType':this.itemBeanClicked.newsType,
...
...
sight_harmony/features/wdComponent/src/main/ets/components/ENewspaperPageComponent.ets
View file @
35debf2
...
...
@@ -36,7 +36,7 @@ export struct ENewspaperPageComponent {
this.swiperIndex = _swiperIndex > 0 ? _swiperIndex - 1 : _swiperIndex
//电子报--版面序号选择点击
TrackingContent.c
ommentC
lickWithEvent('panel_number_selection_click',TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage
TrackingContent.clickWithEvent('panel_number_selection_click',TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage
,{
'panelNumber':this.newspaperListBean?.list[this.swiperIndex].pageNum,
'panelName':this.newspaperListBean?.list[this.swiperIndex].pageName,
...
...
@@ -61,7 +61,7 @@ export struct ENewspaperPageComponent {
new Date(date.fullYear ? date.fullYear : 0, date.month ? date.month : 0, date.date ? date.date : 0)
}
//日历选择点击
TrackingContent.c
ommentC
lickWithEvent('date_selection_click',TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage
TrackingContent.clickWithEvent('date_selection_click',TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage
,{
'panelNumber':this.newspaperListBean?.list[this.swiperIndex].pageNum,
'panelName':this.newspaperListBean?.list[this.swiperIndex].pageName,
...
...
@@ -340,7 +340,7 @@ export struct ENewspaperPageComponent {
if (this.newspaperListBean.list && this.newspaperListBean.list.length > 0) {
this.isOpenListDialog = true
//电子报--读报纸点击
TrackingContent.c
ommentC
lickWithEvent('read_newspaper_click',TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage
TrackingContent.clickWithEvent('read_newspaper_click',TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage
,{
'panelNumber':this.newspaperListBean?.list[this.swiperIndex].pageNum,
'panelName':this.newspaperListBean?.list[this.swiperIndex].pageName,
...
...
sight_harmony/features/wdComponent/src/main/ets/components/InteractMessage/InteractMComponent.ets
View file @
35debf2
...
...
@@ -15,7 +15,7 @@ export struct InteractMComponent {
build() {
Row(){
Image(this.messageModel.InteractMsubM.headUrl)
.alt(
$r('app.media.default_head
'))
.alt(
this.messageModel.InteractMsubM.userType === '1'?$r('app.media.default_head'):$r('app.media.AccountOwner_DefaultIcon
'))
.width(36)
.height(36)
.borderRadius(18)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/MorningEveningPaperComponent.ets
View file @
35debf2
...
...
@@ -295,7 +295,7 @@ export struct MorningEveningPaperComponent {
topPaperTitle(){
Column(){
PaperTitleComponent().margin({top:this.topSafeHeight})
}.height(44+this.topSafeHeight).backgroundColor(this.
scrollOffset > 100?this.mixedBgColor:''
)
}.height(44+this.topSafeHeight).backgroundColor(this.
isHasTopView?(this.scrollOffset > 100?this.mixedBgColor:''):this.mixedBgColor
)
}
@Builder
...
...
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/SingleColumn999Component.ets
View file @
35debf2
...
...
@@ -3,7 +3,7 @@ import { CompList, ContentDTO, InteractDataDTO} from 'wdBean';
import { BreakpointConstants } from 'wdConstant';
import { Logger } from 'wdKit';
import { PaperSingleColumn999CardView } from '../page/CardView';
import { EmptyComponent } from '../view/EmptyComponent';
import { EmptyComponent
,WDViewDefaultType
} from '../view/EmptyComponent';
const TAG = 'SingleColumn999Component';
...
...
@@ -153,9 +153,8 @@ export struct SingleColumn999Component {
})
} else {
if (this.compListItem && this.compListItem?.operDataList) {
EmptyComponent({
emptyHeight: 200
})
EmptyComponent({
emptyType:WDViewDefaultType.WDViewDefaultType_NoListContent
})
}
}
}
...
...
@@ -170,9 +169,13 @@ export struct SingleColumn999Component {
*/
@Builder
buildPaperItem(item: ContentDTO, index: number) {
///屏蔽早晚报 音频
if (item.objectType != '13'){
PaperSingleColumn999CardView({
item: item,
index: index,
})
}
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/topicInfoView.ets
View file @
35debf2
...
...
@@ -75,7 +75,7 @@ export struct topicInfoView {
left: { anchor: "__container__", align: HorizontalAlign.Start },
bottom: this.frontLinkObject.linkUrl.length > 0?{ anchor: "row_detail", align: VerticalAlign.Top }:{ anchor: "__container__", align: VerticalAlign.Bottom }
})
.margin({ left: 16, right: 16
})
.margin({ left: 16, right: 16
, bottom: this.frontLinkObject.linkUrl.length > 0?0:16
})
.id('txt_summary')
Text(this.frontLinkObject?.title ?? "")
...
...
sight_harmony/features/wdComponent/src/main/ets/components/SpacialTopicPageComponent.ets
View file @
35debf2
...
...
@@ -12,6 +12,7 @@ import { EmptyComponent } from '../components/view/EmptyComponent';
import { NetworkUtil, WindowModel } from 'wdKit';
import { viewBlogItemInsightIntentShare } from '../utils/InsightIntentShare'
import { common } from '@kit.AbilityKit';
import { PageRepository } from '../repository/PageRepository';
const TAG: string = 'SpacialTopicPageComponent'
...
...
@@ -59,7 +60,6 @@ export struct SpacialTopicPageComponent {
private async getDetail() {
this.isNetConnected = NetworkUtil.isNetConnected()
let contentId: string = ''
let relId: string = ''
let relType: string = ''
...
...
@@ -74,11 +74,14 @@ export struct SpacialTopicPageComponent {
if (this.action.params.extra.relType) {
relType = this.action.params.extra.relType
}
}
let pageId = this.action.params.extra?.pageId
console.log('pageIdpageId',pageId)
if(pageId){
let pageInfoMsg = await PageRepository.fetchMorningEveningPageInfo(pageId)
let detailBeans = await DetailViewModel.getDetailPageData(relId, contentId, relType)
if (detailBeans && detailBeans.length > 0) {
this.contentDetailData = detailBeans[0];
if (detailBeans?.length > 0) {
this.contentDetailData = JSON.parse(JSON.stringify(detailBeans[0]));
this.viewBlogInsightIntentShare()
// if (this.contentDetailData[0]?.openComment) {
this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '')
...
...
@@ -92,6 +95,11 @@ export struct SpacialTopicPageComponent {
// }
this.trySendData2H5()
}
if(pageInfoMsg && pageInfoMsg.data){
this.contentDetailData.openComment = Number(pageInfoMsg.data.topicInfo.commentFlag)
this.contentDetailData.commentDisplay = Number(pageInfoMsg.data.topicInfo.commentShowFlag)
}
}
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card10Component.ets
View file @
35debf2
...
...
@@ -77,15 +77,8 @@ export struct Card10Component {
InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
ProcessUtils.processPage(this.contentDTO)
})
if(this.contentDTO.objectType == '5'){
Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center).margin({ left: 5, bottom: 5 })
} else {
if (this.contentDTO.seoTags) {
Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center)
}
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center)
}
if (this.contentDTO.objectType == '5') {
Notes({ objectType: 5 }).margin({ left: 5, bottom: 5 })
}
}.alignContent(Alignment.BottomStart)
...
...
@@ -135,15 +128,8 @@ export struct Card10Component {
Row() {
Column() {
Stack() {
if(this.contentDTO.objectType == '5'){
Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center)
} else {
if (this.contentDTO.seoTags) {
Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center)
}
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center)
}
if (item.objectType == '5') {
Notes({ objectType: 5 })
}
Text(item.newsTitle)
.fontSize($r('app.float.font_size_17'))
...
...
@@ -151,12 +137,10 @@ export struct Card10Component {
.fontColor($r('app.color.color_222222'))
.maxLines(2)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 &&
(this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? 58 :
((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5') ? 35 :
0 )
.textIndent(item.objectType == '5' ? 38 : 0)
}.alignContent(Alignment.TopStart)
Blank()
//bottom 评论等信息
CardSourceInfo(
{
...
...
@@ -166,6 +150,7 @@ export struct Card10Component {
)
}
.layoutWeight(1)
.height(78)
.alignItems(HorizontalAlign.Start)
// 右侧图片
...
...
@@ -183,6 +168,7 @@ export struct Card10Component {
})
}
.alignContent(Alignment.BottomEnd)
.height(78)
}
}
.padding({ top: 10, bottom: 10 })
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card11Component.ets
View file @
35debf2
...
...
@@ -39,13 +39,13 @@ export struct Card11Component {
Column() {
Stack() {
if(this.contentDTO.objectType == '5'){
Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center)
Notes({ objectType: this.contentDTO.objectType }).
height(20).
align(Alignment.Center)
} else {
if (this.contentDTO.seoTags) {
Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center)
Notes({ newTags: this.contentDTO.seoTags }).
height(20).
align(Alignment.Center)
}
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center)
Notes({ newTags: this.contentDTO.newTags }).
height(20).
align(Alignment.Center)
}
}
Text() {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card2Component.ets
View file @
35debf2
...
...
@@ -61,13 +61,13 @@ export struct Card2Component {
// }
// }
if(this.contentDTO.objectType == '5'){
Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center)
Notes({ objectType: this.contentDTO.objectType }).
height(20).
align(Alignment.Center)
} else {
if (this.contentDTO.seoTags) {
Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center)
Notes({ newTags: this.contentDTO.seoTags }).
height(20).
align(Alignment.Center)
}
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center)
Notes({ newTags: this.contentDTO.newTags }).
height(20).
align(Alignment.Center)
}
}
//新闻标题
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card3Component.ets
View file @
35debf2
...
...
@@ -42,13 +42,13 @@ export struct Card3Component {
// Notes({ objectType: this.contentDTO.objectType }).height(27).align(Alignment.Center)
// }
if(this.contentDTO.objectType == '5'){
Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center)
Notes({ objectType: this.contentDTO.objectType }).
height(20).
align(Alignment.Center)
} else {
if (this.contentDTO.seoTags) {
Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center)
Notes({ newTags: this.contentDTO.seoTags }).
height(20).
align(Alignment.Center)
}
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center)
Notes({ newTags: this.contentDTO.newTags }).
height(20).
align(Alignment.Center)
}
}
Text() {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card5Component.ets
View file @
35debf2
...
...
@@ -58,13 +58,13 @@ export struct Card5Component {
Row() {
Stack() {
if(this.contentDTO.objectType == '5'){
Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center)
Notes({ objectType: this.contentDTO.objectType }).
height(20).
align(Alignment.Center)
} else {
if (this.contentDTO.seoTags) {
Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center)
Notes({ newTags: this.contentDTO.seoTags }).
height(20).
align(Alignment.Center)
}
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center)
Notes({ newTags: this.contentDTO.newTags }).
height(20).
align(Alignment.Center)
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card6Component.ets
View file @
35debf2
...
...
@@ -53,17 +53,16 @@ export struct Card6Component {
// }
Stack() {
if(this.contentDTO.objectType == '5'){
Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center)
Notes({ objectType: this.contentDTO.objectType }).
height(28).
align(Alignment.Center)
} else {
if (this.contentDTO.seoTags) {
Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center)
Notes({ newTags: this.contentDTO.seoTags }).
height(28).
align(Alignment.Center)
}
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center)
Notes({ newTags: this.contentDTO.newTags }).
height(28).
align(Alignment.Center)
}
}
Text() {
if (this.titleMarked) {
ForEach(this.textArr, (textItem: textItem) => {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card9Component.ets
View file @
35debf2
...
...
@@ -89,14 +89,14 @@ export struct Card9Component {
topRight: $r('app.float.image_border_radius')
})
if(this.contentDTO.objectType == '5'){
Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center)
Notes({ objectType: this.contentDTO.objectType }).
height(20).
align(Alignment.Center)
.margin({ left: 5, bottom: 5 })
} else {
if (this.contentDTO.seoTags) {
Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center)
Notes({ newTags: this.contentDTO.seoTags }).
height(20).
align(Alignment.Center)
}
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center)
Notes({ newTags: this.contentDTO.newTags }).
height(20).
align(Alignment.Center)
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/comment/model/PublishCommentModel.ets
View file @
35debf2
...
...
@@ -41,7 +41,8 @@ export class publishCommentModel {
//最新发布的评论
lastCommentModel: commentItemModel = new commentItemModel()
pageId: string = ''
pageName: string = ''
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentComponent.ets
View file @
35debf2
...
...
@@ -16,7 +16,7 @@ const TAG = 'CommentComponent';
const testString = '因为读书的人\n是低着头向上看的人\n身处一隅,却能放眼世界\n2,因为读书的人\n总是比不读书的人\n活得有趣一点\n3,因为读书的人\n即使平凡,绝不平庸'
//评论组件
// @Entry
@Preview
@Component
...
...
sight_harmony/features/wdComponent/src/main/ets/components/comment/viewmodel/CommentViewModel.ets
View file @
35debf2
...
...
@@ -6,6 +6,7 @@ import {
import { HttpBizUtil, HttpUrlUtils, HttpUtils, ResponseDTO } from 'wdNetwork/Index';
import { HttpRequest } from 'wdNetwork/src/main/ets/http/HttpRequest';
import { ProcessUtils, WDRouterPage, WDRouterRule } from 'wdRouter/Index';
import { TrackConstants, TrackingContent } from 'wdTracking/Index';
import {
commentItemModel,
commentListModel,
...
...
@@ -16,7 +17,7 @@ import {
import { publishCommentModel } from '../model/PublishCommentModel';
const TAG = "CommentViewModel"
//评论model
class CommentViewModel {
private static instance: CommentViewModel
...
...
@@ -166,9 +167,9 @@ class CommentViewModel {
return new Promise<commentItemModel>((success, fail) => {
const visitorMode = model.visitorComment == "1" && HttpUtils.isLogin() == false
let url = visitorMode ? HttpUrlUtils.getNoUserPublishCommentUrl() : HttpUrlUtils.getPublishCommentUrl()
let pageId = model.pageId;
let pageName = model.pageName;
let bean: Record<string, string> = {};
bean['targetId'] = model.targetId;
bean['targetRelId'] = model.targetRelId;
bean['commentType'] = model.commentType;
...
...
@@ -188,6 +189,11 @@ 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/mine/MinePagePersonFunctionUI.ets
View file @
35debf2
...
...
@@ -16,7 +16,7 @@ export default struct MinePagePersonFunctionUI {
Grid(){
ForEach(this.personalData,(item:MinePagePersonalFunctionsItem,index:number)=>{
GridItem(){
PagePersonFunction({ item: item, noDivider : (index %
4 < 3
&& index != this.personalData.length-1) ? false : true})
PagePersonFunction({ item: item, noDivider : (index %
5 < 4
&& index != this.personalData.length-1) ? false : true})
}.onClick(()=>{
console.log(index+"")
switch (item.msg){
...
...
@@ -77,14 +77,14 @@ export default struct MinePagePersonFunctionUI {
break;
}
}
}).width('1
69
lpx')
}).width('1
42
lpx')
.height('117lpx')
})
}
.rowsTemplate('1fr 1fr')
.columnsTemplate('1fr 1fr 1fr 1fr')
.height('234lpx')
.margin({top:'31lpx',left:'23lpx',right:'23lpx' })
.rowsTemplate('1fr')
.columnsTemplate('1fr 1fr 1fr 1fr 1fr')
.height('117lpx')
.margin({top:'31lpx'})
}
messageClick(){
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/CardView.ets
View file @
35debf2
...
...
@@ -542,11 +542,19 @@ export struct PaperSingleColumn999CardView {
if (this.item) {
Row() {
Row() {
if (this.item.corner.length > 0){
Text(this.item.corner)
.fontSize(12)
.fontColor('#ED2800')
.margin({ left: 16 })
}
if (this.buildSourceString().length > 0) {
Text(this.buildSourceString())
.fontSize(12)
.fontColor('#B0B0B0')
.margin({ left: 16 })
.margin({ left:
this.item.corner.length > 0?10:
16 })
///不显示时间或者不显示评论
if (this.getPublishTime().length > 0 || this.item.objectType != '2' && this.interactData && this.interactData.commentNum && Number(this.interactData.commentNum) > 0) {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/MyCollectionListPage.ets
View file @
35debf2
...
...
@@ -114,6 +114,7 @@ struct MyCollectionListPage {
.height(CommonConstants.FULL_HEIGHT)
}
}
.backgroundColor('#FFFFFF')
.width(CommonConstants.FULL_WIDTH)
.height(CommonConstants.FULL_HEIGHT)
}
...
...
sight_harmony/features/wdComponent/src/main/ets/utils/InsightIntentShare.ets
View file @
35debf2
...
...
@@ -62,8 +62,7 @@ export function viewBlogInsightIntentShare(context: common.UIAbilityContext, ent
commentCount: _item?.interactData?.commentNum || 0,
favorites: _item?.interactData?.collectNum || 0,
viewCount: _item?.interactData?.readNum || 0,
rankingHint: 99,
isPublicData: true
rankingHint: 99
}
}
insightIntentArray.push(viewBlogInsightIntentItem)
...
...
@@ -113,8 +112,7 @@ export function viewBlogItemInsightIntentShare(context: common.UIAbilityContext,
forwardCount: interactData?.shareNum || 0,
commentCount: interactData?.commentNum || 0,
favorites: interactData?.collectNum || 0,
rankingHint: 99,
isPublicData: true
rankingHint: 99
}
}
...
...
@@ -147,8 +145,7 @@ export function viewColumInsightIntentShare(context: common.UIAbilityContext, en
activityType: ['RecentViews'],
columnTitle: pageInfoBean?.topicInfo?.title,
columnSubTitle: pageInfoBean?.shareSummary,
rankingHint: 99,
isPublicData: true
rankingHint: 99
}
}
console.log('yzl viewColumInsightIntentShare', JSON.stringify(viewColumInsightIntentItem))
...
...
sight_harmony/features/wdComponent/src/main/resources/base/media/AccountOwner_DefaultIcon.png
0 → 100644
View file @
35debf2
4.68 KB
sight_harmony/features/wdDetailPlayShortVideo/oh-package.json5
View file @
35debf2
...
...
@@ -16,6 +16,7 @@
"wdConstant"
:
"file:../../commons/wdConstant"
,
"wdDetailPlayApi"
:
"file:../../features/wdDetailPlayApi"
,
"wdComponent"
:
"file:../../features/wdComponent"
,
"wdShare"
:
"file:../../features/wdShare"
"wdShare"
:
"file:../../features/wdShare"
,
"wdTracking"
:
"file:../../features/wdTracking"
}
}
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailVideoListPage.ets
View file @
35debf2
...
...
@@ -8,6 +8,8 @@ import { contentListParams } from 'wdDetailPlayApi/src/main/ets/request/ContentD
import { DisplayDirection } from 'wdConstant/Index';
import { window } from '@kit.ArkUI';
import { EmptyComponent } from 'wdComponent/Index';
import { DateTimeUtils } from 'wdKit/Index';
import { TrackConstants, TrackingPageBrowse } from 'wdTracking/Index';
const storage = LocalStorage.getShared();
const TAG = 'DetailVideoListPage'
...
...
@@ -33,6 +35,8 @@ export struct DetailVideoListPage {
@State currentIndex: number = 0
@State netStatus: number | undefined = undefined // 存储网络状态用来展示缺省图
@State interactDataList: InteractDataDTO[] = []
pageShowTime:number = 0;
pageHideTime:number = 0;
async aboutToAppear(): Promise<void> {
// 注册监听网络连接
...
...
@@ -70,12 +74,18 @@ export struct DetailVideoListPage {
this.switchVideoStatus = true
this.openFullScreen()
this.pageShowTime = DateTimeUtils.getTimeStamp()
}
onPageHide(): void {
console.log(TAG, 'onPageHide')
this.switchVideoStatus = false
this.closeFullScreen()
this.pageHideTime = DateTimeUtils.getTimeStamp()
let duration = 0
duration = Math.floor((this.pageHideTime - this.pageShowTime)/1000)
TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Customer_Personal,TrackConstants.PageName.Customer_Personal,duration)
}
/**
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/VideoChannelDetail.ets
View file @
35debf2
...
...
@@ -14,6 +14,8 @@ import { PictureLoading } from './PictureLoading';
import { DisplayDirection } from 'wdConstant/Index';
import { window } from '@kit.ArkUI';
import { EmptyComponent, WDViewDefaultType } from 'wdComponent/Index';
import { DateTimeUtils } from 'wdKit/Index';
import {TrackConstants,TrackingPageBrowse } from 'wdTracking/Index';
interface loadMoreData {
pageNum: number;
...
...
@@ -59,6 +61,8 @@ export struct VideoChannelDetail {
@State totalCount: number = 0
@State isMouted: boolean = false
@State isRequestError: boolean = false
pageShowTime:number = 0;
pageHideTime:number = 0;
autoRefreshChange() {
if (this.topNavIndex === 0) {
...
...
@@ -78,12 +82,21 @@ export struct VideoChannelDetail {
this.switchVideoStatus = true
this.openFullScreen()
}
this.pageShowTime = DateTimeUtils.getTimeStamp()
console.log(TAG, '一级视频显示')
}
pageHideChange() {
this.barBackgroundColor = Color.Transparent
this.switchVideoStatus = false
this.closeFullScreen()
console.log(TAG, '一级视频隐藏')
this.pageHideTime = DateTimeUtils.getTimeStamp()
let duration = 0
duration = Math.floor((this.pageHideTime - this.pageShowTime)/1000)
TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Customer_Personal,TrackConstants.PageName.Customer_Personal,duration)
}
/**
...
...
@@ -255,7 +268,6 @@ export struct VideoChannelDetail {
})
}
}
build() {
Column() {
if (this.isRequestError) {
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerRightView.ets
View file @
35debf2
...
...
@@ -14,6 +14,7 @@ import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
import { DisplayDirection, SpConstants } from 'wdConstant/Index'
import { WDShare } from "wdShare"
import { publishCommentModel } from 'wdComponent/Index';
import { ParamType, TrackConstants, TrackingButton, TrackingContent } from 'wdTracking/Index';
interface ILikeStyleResp {
url: Resource;
...
...
@@ -37,16 +38,44 @@ export struct PlayerRightView {
@Consume showCommentList: boolean
@Consume displayDirection: DisplayDirection
@Consume publishCommentModel: publishCommentModel
@State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
//
@State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
@State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以
@State likesStyle: number | string = this.contentDetailData.likesStyle // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
pageParam: ParamType = {}
PageName: string = ''
followUserId: string = ''
followUserName: string = ''
aboutToAppear() {
// 内容用 点赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
this.likesStyle = this.contentDetailData.likesStyle
this.openLikes = this.contentDetailData.openLikes == 1 ? true : false
// console.log(TAG, 'this.likesStyle', this.likesStyle)
// console.log(TAG, 'this.openLikes', this.openLikes)
this.contentTrackingDict()
}
contentTrackingDict(){
this.pageParam = {
'contentType': `${this.contentDetailData.newsType}`,
'contentId': `${this.contentDetailData.newsId}`,
'contentName': `${this.contentDetailData.newsTitle || ''}`,
}
if(this.contentDetailData.newsType == 1) {
this.PageName = TrackConstants.PageName.VideoDetail // 点播
} else if(this.contentDetailData.newsType == 2) {
this.PageName = TrackConstants.PageName.Live_Detail // 直播
} else if(this.contentDetailData.newsType == 5) {
this.PageName = TrackConstants.PageName.Summary_Detail // 专题详情页
} else if(this.contentDetailData.newsType == 8) {
this.PageName = TrackConstants.PageName.Article_Detail // 图文详情页
} else if(this.contentDetailData.newsType == 9) {
this.PageName = TrackConstants.PageName.Atlas_Detail // 图集详情页
} else if(this.contentDetailData.newsType == 14 || this.contentDetailData.newsType == 15) {
this.PageName = TrackConstants.PageName.DynamicDetail // 动态图文/动态视频
}
this.followUserId = this.contentDetailData?.rmhInfo?.rmhId || ''
this.followUserName = this.contentDetailData?.rmhInfo?.rmhName || ''
}
/**
* 点赞、取消点赞
*/
...
...
@@ -76,8 +105,12 @@ export struct PlayerRightView {
this.newsStatusOfUser.likeStatus = this.newsStatusOfUser?.likeStatus == '1' ? '0' : '1'
if (this.newsStatusOfUser.likeStatus == '1') {
this.interactData.likeNum = Number(this.interactData.likeNum || 0) + 1
TrackingContent.like(true,this.PageName,this.PageName,this.pageParam)
console.log(TAG, '点赞')
} else {
this.interactData.likeNum = Math.max(0, Number(this.interactData.likeNum || 0) - 1)
TrackingContent.like(false,this.PageName,this.PageName,this.pageParam)
console.log(TAG, '取消点赞')
}
console.log(TAG, '点赞、取消点赞==', this.newsStatusOfUser?.likeStatus, this.interactData?.likeNum)
// this.queryContentInteractCount()
...
...
@@ -112,8 +145,12 @@ export struct PlayerRightView {
// this.queryContentInteractCount()
if (this.newsStatusOfUser.collectStatus === 1) {
this.interactData.collectNum = Number(this.interactData.collectNum || 0) + 1
TrackingContent.collect(true,this.PageName,this.PageName,this.pageParam)
console.log(TAG, '收藏')
} else {
this.interactData.collectNum = Math.max(0, Number(this.interactData.collectNum || 0) - 1)
TrackingContent.collect(false,this.PageName,this.PageName,this.pageParam)
console.log(TAG, '取消收藏')
}
console.log(TAG, '收藏、取消收藏==', this.newsStatusOfUser?.collectStatus, this.interactData?.collectNum)
}
...
...
@@ -175,6 +212,8 @@ export struct PlayerRightView {
ToastUtils.showToast(res.data.ruleName + '+' + res.data.rulePoint + '积分', 1000);
}
})
console.log(TAG, '关注号主')
TrackingContent.follow(true,this.followUserId,this.followUserName,TrackConstants.PageName.Atlas_Detail,TrackConstants.PageName.Atlas_Detail,this.pageParam)
}
})
}
...
...
sight_harmony/features/wdTracking/src/main/ets/tracking/TrackingContent.ets
View file @
35debf2
...
...
@@ -3,6 +3,7 @@ import { TrackConstants } from "../common/TrackConstants"
import { TrackingUtils } from '../common/TrackingUtils'
import { Tracking } from './Tracking'
import { PointerMatrix } from '@kit.TestKit'
import { StringUtils } from 'wdKit/Index'
export class TrackingContent {
...
...
@@ -86,10 +87,10 @@ export class TrackingContent {
}
static commentClick(pageId: string, pageName: string, extParams?: ParamType) {
TrackingContent.c
ommentClickWithEvent("content_comment_click",pageId,pageName
,extParams);
TrackingContent.c
lickWithEventAction("content_comment_click",pageId,pageName,TrackConstants.ActionType.Comment
,extParams);
}
static c
ommentClickWithEvent(event: string,pageId: string, pageName
: string, extParams?: ParamType) {
static c
lickWithEventAction(event: string,pageId: string, pageName: string,action
: string, extParams?: ParamType) {
let params = TrackingUtils.generateParams(extParams)
if (pageId.length) {
params["pageId"] = pageId
...
...
@@ -97,11 +98,17 @@ export class TrackingContent {
if (pageName.length) {
params["pageName"] = pageName
}
params["action"] =TrackConstants.ActionType.Comment
if(!StringUtils.isEmpty(action)){
params["action"] =action
}
TrackingUtils.fillPositionWith(params)
Tracking.event(event, params)
}
static clickWithEvent(event: string,pageId: string, pageName: string,extParams?: ParamType) {
TrackingContent.clickWithEventAction(event,pageId,pageName,'',extParams);
}
static commentShare(pageId: string, pageName: string, extParams?: ParamType) {
}
...
...
Please
register
or
login
to post a comment