Showing
3 changed files
with
12 additions
and
5 deletions
| @@ -6,6 +6,7 @@ import { DetailPlayLivePage } from './DetailPlayLivePage'; | @@ -6,6 +6,7 @@ import { DetailPlayLivePage } from './DetailPlayLivePage'; | ||
| 6 | import { DetailPlayVLivePage } from './DetailPlayVLivePage'; | 6 | import { DetailPlayVLivePage } from './DetailPlayVLivePage'; |
| 7 | import { Logger, ToastUtils } from 'wdKit/Index'; | 7 | import { Logger, ToastUtils } from 'wdKit/Index'; |
| 8 | import { publishCommentModel } from 'wdComponent/src/main/ets/components/comment/model/PublishCommentModel'; | 8 | import { publishCommentModel } from 'wdComponent/src/main/ets/components/comment/model/PublishCommentModel'; |
| 9 | +import { PictureLoading } from '../widgets/vertical/PictureLoading'; | ||
| 9 | 10 | ||
| 10 | const TAG = 'DetailPlayLiveCommon' | 11 | const TAG = 'DetailPlayLiveCommon' |
| 11 | 12 | ||
| @@ -36,6 +37,8 @@ export struct DetailPlayLiveCommon { | @@ -36,6 +37,8 @@ export struct DetailPlayLiveCommon { | ||
| 36 | // 横屏或竖屏 general-竖屏,news-横屏 | 37 | // 横屏或竖屏 general-竖屏,news-横屏 |
| 37 | @State liveLandscape: string = '' | 38 | @State liveLandscape: string = '' |
| 38 | 39 | ||
| 40 | + @State isLoading: boolean = false | ||
| 41 | + | ||
| 39 | async aboutToAppear(): Promise<void> { | 42 | async aboutToAppear(): Promise<void> { |
| 40 | const par: Action = router.getParams() as Action; | 43 | const par: Action = router.getParams() as Action; |
| 41 | const params = par?.params; | 44 | const params = par?.params; |
| @@ -55,6 +58,8 @@ export struct DetailPlayLiveCommon { | @@ -55,6 +58,8 @@ export struct DetailPlayLiveCommon { | ||
| 55 | } else if (this.liveLandscape === 'general') { | 58 | } else if (this.liveLandscape === 'general') { |
| 56 | // 沉浸式直播 | 59 | // 沉浸式直播 |
| 57 | DetailPlayVLivePage() | 60 | DetailPlayVLivePage() |
| 61 | + }else { | ||
| 62 | + PictureLoading().visibility(this.isLoading ? Visibility.None : Visibility.Visible) | ||
| 58 | } | 63 | } |
| 59 | } | 64 | } |
| 60 | .height('100%') | 65 | .height('100%') |
| @@ -117,10 +122,12 @@ export struct DetailPlayLiveCommon { | @@ -117,10 +122,12 @@ export struct DetailPlayLiveCommon { | ||
| 117 | 122 | ||
| 118 | 123 | ||
| 119 | } else { | 124 | } else { |
| 125 | + this.isLoading | ||
| 120 | ToastUtils.shortToast('内容不存在') | 126 | ToastUtils.shortToast('内容不存在') |
| 121 | router.back() | 127 | router.back() |
| 122 | } | 128 | } |
| 123 | },()=>{ | 129 | },()=>{ |
| 130 | + this.isLoading | ||
| 124 | ToastUtils.shortToast('内容不存在') | 131 | ToastUtils.shortToast('内容不存在') |
| 125 | router.back() | 132 | router.back() |
| 126 | 133 |
| @@ -20,14 +20,14 @@ export class LiveModel { | @@ -20,14 +20,14 @@ export class LiveModel { | ||
| 20 | }).then(async (resDTO: ResponseDTO<ContentDetailDTO[]>) => { | 20 | }).then(async (resDTO: ResponseDTO<ContentDetailDTO[]>) => { |
| 21 | console.log(TAG, 'getContentDetail:', JSON.stringify(resDTO.data)) | 21 | console.log(TAG, 'getContentDetail:', JSON.stringify(resDTO.data)) |
| 22 | if (resDTO.data) { | 22 | if (resDTO.data) { |
| 23 | - console.error("XXXXZZZZ", '---getContentDetail-0---1------------') | 23 | + //console.error("XXXXZZZZ", '---getContentDetail-0---1------------') |
| 24 | success(resDTO.data) | 24 | success(resDTO.data) |
| 25 | }else { | 25 | }else { |
| 26 | - console.error("XXXXZZZZ", '---getContentDetail-0--2------------') | 26 | + // console.error("XXXXZZZZ", '---getContentDetail-0--2----1--------') |
| 27 | fail("数据为空") | 27 | fail("数据为空") |
| 28 | } | 28 | } |
| 29 | }).catch(() => { | 29 | }).catch(() => { |
| 30 | - console.error("XXXXZZZZ", '---getContentDetail-0--2------------') | 30 | + // console.error("XXXXZZZZ", '---getContentDetail-0--2----2--------') |
| 31 | fail("数据为空") | 31 | fail("数据为空") |
| 32 | }) | 32 | }) |
| 33 | 33 |
| @@ -22,10 +22,10 @@ export class LiveViewModel { | @@ -22,10 +22,10 @@ export class LiveViewModel { | ||
| 22 | getContentDetail(contentId: string, relId: string, relType: string) { | 22 | getContentDetail(contentId: string, relId: string, relType: string) { |
| 23 | return new Promise<Array<ContentDetailDTO>>((success, fail) => { | 23 | return new Promise<Array<ContentDetailDTO>>((success, fail) => { |
| 24 | this.liveModel.getContentDetail(contentId, relId, relType).then((data) => { | 24 | this.liveModel.getContentDetail(contentId, relId, relType).then((data) => { |
| 25 | - console.error("XXXXZZZZ", '---getContentDetail---1------------') | 25 | + //console.error("XXXXZZZZ", '---getContentDetail---1------------') |
| 26 | success(data) | 26 | success(data) |
| 27 | }).catch((message: string) => { | 27 | }).catch((message: string) => { |
| 28 | - console.error("XXXXZZZZ", '----getContentDetail--2------------') | 28 | + // console.error("XXXXZZZZ", '----getContentDetail--2------------') |
| 29 | fail(message) | 29 | fail(message) |
| 30 | }) | 30 | }) |
| 31 | }) | 31 | }) |
-
Please register or login to post a comment