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-30 17:02:04 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
94a2b2107b2658bd4667c926e6f9d1646b2a1779
94a2b210
1 parent
e0e0302b
feat:直播详情页面,正在直播的 人民号直播信息需要接口获取流
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
10 deletions
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayLiveCommon.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayLiveCommon.ets
View file @
94a2b21
...
...
@@ -23,7 +23,7 @@ const TAG = 'DetailPlayLiveCommon'
@Component
export struct DetailPlayLiveCommon {
private liveViewModel: LiveViewModel = new LiveViewModel()
pageShowTime:number = 0;
pageShowTime:
number = 0;
@Provide relId: string = ''
@Provide contentId: string = ''
@Provide relType: string = ''
...
...
@@ -38,7 +38,6 @@ export struct DetailPlayLiveCommon {
@Provide publishCommentModel: publishCommentModel = new publishCommentModel()
// 横屏或竖屏 general-竖屏,news-横屏
@State liveLandscape: string = ''
@State isLoading: boolean = false
async aboutToAppear(): Promise<void> {
...
...
@@ -56,7 +55,6 @@ export struct DetailPlayLiveCommon {
}
build() {
Column() {
// 直播预约或横屏直播统一进横屏直播
...
...
@@ -66,7 +64,7 @@ export struct DetailPlayLiveCommon {
} else if (this.liveLandscape === 'general') {
// 沉浸式直播
DetailPlayVLivePage()
}else {
}
else {
PictureLoading().visibility(this.isLoading ? Visibility.None : Visibility.Visible)
}
}
...
...
@@ -86,7 +84,7 @@ export struct DetailPlayLiveCommon {
if (data) {
let detailData = data[0]
//人民号类型单独获取直播地址
if (detailData.rmhPlatform === 1) {
if (detailData.rmhPlatform === 1
&& detailData.liveInfo?.liveState === 'running'
) {
let vliveId = detailData.liveInfo.vlive[0].vliveId as string
console.error(TAG, 'vliveId==' + vliveId)
...
...
@@ -133,7 +131,7 @@ export struct DetailPlayLiveCommon {
ToastUtils.shortToast('内容不存在')
router.back()
}
},
()=>
{
},
() =>
{
this.isLoading
ToastUtils.shortToast('内容不存在')
router.back()
...
...
@@ -141,8 +139,6 @@ export struct DetailPlayLiveCommon {
})
}
onPageShow() {
this.pageShow = Math.random()
Logger.info(TAG, 'onPageShow')
...
...
@@ -154,8 +150,9 @@ export struct DetailPlayLiveCommon {
Logger.info(TAG, 'onPageHide')
console.error("XXXXZZZZ", '---onPageHide------------')
//页面浏览
TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Live_Detail,TrackConstants.PageName.Live_Detail
,Math.floor((DateTimeUtils.getTimeStamp() - this.pageShowTime)/1000))
TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Live_Detail,
TrackConstants.PageName.Live_Detail
, Math.floor((DateTimeUtils.getTimeStamp() - this.pageShowTime) / 1000))
}
...
...
Please
register
or
login
to post a comment