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 13:48:56 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3c489acaaa3114657b9ba753c59acb8f14f209b6
3c489aca
1 parent
e1956ad8
fix:生产环境,点击直播,先黑屏,再露出直播内容。
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
5 deletions
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayLiveCommon.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/viewModel/LiveModel.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/viewModel/LiveViewModel.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayLiveCommon.ets
View file @
3c489ac
...
...
@@ -6,6 +6,7 @@ import { DetailPlayLivePage } from './DetailPlayLivePage';
import { DetailPlayVLivePage } from './DetailPlayVLivePage';
import { Logger, ToastUtils } from 'wdKit/Index';
import { publishCommentModel } from 'wdComponent/src/main/ets/components/comment/model/PublishCommentModel';
import { PictureLoading } from '../widgets/vertical/PictureLoading';
const TAG = 'DetailPlayLiveCommon'
...
...
@@ -36,6 +37,8 @@ export struct DetailPlayLiveCommon {
// 横屏或竖屏 general-竖屏,news-横屏
@State liveLandscape: string = ''
@State isLoading: boolean = false
async aboutToAppear(): Promise<void> {
const par: Action = router.getParams() as Action;
const params = par?.params;
...
...
@@ -55,6 +58,8 @@ export struct DetailPlayLiveCommon {
} else if (this.liveLandscape === 'general') {
// 沉浸式直播
DetailPlayVLivePage()
}else {
PictureLoading().visibility(this.isLoading ? Visibility.None : Visibility.Visible)
}
}
.height('100%')
...
...
@@ -117,10 +122,12 @@ export struct DetailPlayLiveCommon {
} else {
this.isLoading
ToastUtils.shortToast('内容不存在')
router.back()
}
},()=>{
this.isLoading
ToastUtils.shortToast('内容不存在')
router.back()
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/viewModel/LiveModel.ets
View file @
3c489ac
...
...
@@ -20,14 +20,14 @@ export class LiveModel {
}).then(async (resDTO: ResponseDTO<ContentDetailDTO[]>) => {
console.log(TAG, 'getContentDetail:', JSON.stringify(resDTO.data))
if (resDTO.data) {
console.error("XXXXZZZZ", '---getContentDetail-0---1------------')
//
console.error("XXXXZZZZ", '---getContentDetail-0---1------------')
success(resDTO.data)
}else {
console.error("XXXXZZZZ", '---getContentDetail-0--2----
--------')
// console.error("XXXXZZZZ", '---getContentDetail-0--2----1
--------')
fail("数据为空")
}
}).catch(() => {
console.error("XXXXZZZZ", '---getContentDetail-0--2----
--------')
// console.error("XXXXZZZZ", '---getContentDetail-0--2----2
--------')
fail("数据为空")
})
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/viewModel/LiveViewModel.ets
View file @
3c489ac
...
...
@@ -22,10 +22,10 @@ export class LiveViewModel {
getContentDetail(contentId: string, relId: string, relType: string) {
return new Promise<Array<ContentDetailDTO>>((success, fail) => {
this.liveModel.getContentDetail(contentId, relId, relType).then((data) => {
console.error("XXXXZZZZ", '---getContentDetail---1------------')
//
console.error("XXXXZZZZ", '---getContentDetail---1------------')
success(data)
}).catch((message: string) => {
console.error("XXXXZZZZ", '----getContentDetail--2------------')
//
console.error("XXXXZZZZ", '----getContentDetail--2------------')
fail(message)
})
})
...
...
Please
register
or
login
to post a comment