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-06-13 18:49:22 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4a2666244c7ef9128126c7e3dd895410de0b3cea
4a266624
1 parent
10ef4874
频道列表点击已下线视频,未展示内容找不到了缺省页,而是推荐其它视频播放
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
2 deletions
sight_harmony/features/wdComponent/src/main/ets/components/view/EmptyComponent.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailVideoListPage.ets
sight_harmony/products/phone/src/main/ets/pages/view/MultiPictureDetailPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/EmptyComponent.ets
View file @
4a26662
...
...
@@ -129,6 +129,7 @@ export struct EmptyComponent {
.fontWeight(FontWeight.Normal)
.opacity(this.TEXT_OPACITY)
.margin({ top: this.EMPTY_TIP_TEXT_MARGIN_TOP })
.fontColor(this.emptyType !== 15 ? '#FFCCCCCC' : '#999999')
.onClick((event: ClickEvent) => {
Logger.info(TAG, `noProgrammeData onClick event?.source: ${event.source}`);
})
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailVideoListPage.ets
View file @
4a26662
...
...
@@ -36,6 +36,7 @@ export struct DetailVideoListPage {
@State data: ContentDetailDTO[] = []
@State currentIndex: number = 0
@State netStatus: number | undefined = undefined // 存储网络状态用来展示缺省图
@State isOffLine: boolean = false // 存储视频下线状态用来展示缺省图
@State interactDataList: InteractDataDTO[] = []
pageShowTime:number = 0;
pageHideTime:number = 0;
...
...
@@ -140,6 +141,7 @@ export struct DetailVideoListPage {
relType: relType
}).then(async (resDTO: ResponseDTO<ContentDetailDTO[]>) => {
console.log(TAG, 'getContentDetail:', JSON.stringify(resDTO.data))
this.isOffLine = resDTO.data == null ? true : false
if (resDTO.data) {
const params: contentListParams = {
contentList: [{
...
...
@@ -202,7 +204,7 @@ export struct DetailVideoListPage {
build() {
if (this.netStatus !== undefined) {
EmptyComponent({
emptyType:
this.netStatus
, emptyButton: true, retry: () => {
emptyType:
1
, emptyButton: true, retry: () => {
this.getContentDetail(this.contentId, this.relId, this.relType)
}
})
...
...
@@ -211,6 +213,18 @@ export struct DetailVideoListPage {
center: { anchor: "__container__", align: VerticalAlign.Center },
middle: { anchor: "__container__", align: HorizontalAlign.Center }
})
} else if (this.isOffLine) {
EmptyComponent({
emptyType: 15, emptyButton: true, retry: () => {
this.getContentDetail(this.contentId, this.relId, this.relType)
}
})
.id('e_empty_content')
.alignRules({
center: { anchor: "__container__", align: VerticalAlign.Center },
middle: { anchor: "__container__", align: HorizontalAlign.Center }
})
.backgroundColor(Color.Black)
} else {
Column() {
Swiper(this.swiperController) {
...
...
sight_harmony/products/phone/src/main/ets/pages/view/MultiPictureDetailPageComponent.ets
View file @
4a26662
...
...
@@ -55,6 +55,7 @@ export struct MultiPictureDetailPageComponent {
@Provide showCommentList: boolean = false
private scroller: Scroller = new Scroller()
@State netStatus: number | undefined = undefined // 存储网络状态用来展示缺省图
@State isOffLine: boolean = false // 存储视频下线状态用来展示缺省图
@State showDownload: Boolean = false // 控制是否显示下载默认隐藏
@State publishCommentModel: publishCommentModel = new publishCommentModel()
@State operationButtonList: string[] = ['comment', 'like', 'collect', 'share']
...
...
@@ -330,7 +331,7 @@ export struct MultiPictureDetailPageComponent {
}
if (this.netStatus !== undefined) {
EmptyComponent({
emptyType:
this.netStatus
, emptyButton: true, retry: () => {
emptyType:
1
, emptyButton: true, retry: () => {
this.getContentDetailData()
}
})
...
...
@@ -340,6 +341,19 @@ export struct MultiPictureDetailPageComponent {
middle: { anchor: "__container__", align: HorizontalAlign.Center }
})
}
if (this.isOffLine) {
EmptyComponent({
emptyType: 15, emptyButton: true, retry: () => {
this.getContentDetailData
}
})
.id('e_empty_content')
.alignRules({
center: { anchor: "__container__", align: VerticalAlign.Center },
middle: { anchor: "__container__", align: HorizontalAlign.Center }
})
.backgroundColor(Color.Black)
}
Column() {
if (!this.showDownload) {
Column() {
...
...
@@ -487,6 +501,7 @@ export struct MultiPictureDetailPageComponent {
try {
PageRepository.fetchDetailData(this.relId, this.contentId, this.relType)
.then(async (resDTO: ResponseDTO<ContentDetailDTO[]>) => {
this.isOffLine = resDTO.data == null ? true : false
if (!resDTO || !resDTO.data) {
Logger.error(TAG, 'fetchDetailData is empty');
return
...
...
Please
register
or
login
to post a comment