liyubing

fix:生产环境,点击直播,先黑屏,再露出直播内容。

... ... @@ -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()
... ...
... ... @@ -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("数据为空")
})
... ...
... ... @@ -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)
})
})
... ...