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
张善主
2024-05-28 09:50:28 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
c21825dc8a2d6aa864bb88a4d3301d03b43e374d
c21825dc
2 parents
136a5b99
ee6bcf52
Merge remote-tracking branch 'origin/main'
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
68 additions
and
6 deletions
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/MorningEveningPaperComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/topicInfoView.ets
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/wdComponent/src/main/ets/components/MorningEveningPaper/MorningEveningPaperComponent.ets
View file @
c21825d
...
...
@@ -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/topicInfoView.ets
View file @
c21825d
...
...
@@ -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/wdDetailPlayShortVideo/oh-package.json5
View file @
c21825d
...
...
@@ -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 @
c21825d
...
...
@@ -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 @
c21825d
...
...
@@ -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 @
c21825d
...
...
@@ -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)
}
})
}
...
...
Please
register
or
login
to post a comment