yuzhilin

fix:H5详情页增加无网缺省图

import { Logger, NumberFormatterUtils, DateTimeUtils, EmitterUtils, EmitterEventId } from 'wdKit';
import { Logger, NumberFormatterUtils, DateTimeUtils, EmitterUtils, EmitterEventId, NetworkUtil } from 'wdKit';
import {
Action,
ContentDetailDTO,
... ... @@ -20,7 +20,7 @@ import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailView
import { PageRepository } from '../repository/PageRepository';
import { detailedSkeleton } from './skeleton/detailSkeleton';
import { publishCommentModel } from '../components/comment/model/PublishCommentModel';
import { EmptyComponent } from '../components/view/EmptyComponent';
import { CommentComponent } from '../components/comment/view/CommentComponent'
import { HttpUtils } from 'wdNetwork/Index';
... ... @@ -40,6 +40,7 @@ export struct ImageAndTextPageComponent {
@State publishTime: string = ''
@State publishCommentModel: publishCommentModel = new publishCommentModel()
@State operationButtonList: string[] = ['comment', 'collect', 'share']
@State isNetConnected: boolean = true
build() {
Column() {
... ... @@ -143,9 +144,19 @@ export struct ImageAndTextPageComponent {
.scrollBar(BarState.Off)
.align(Alignment.Top)
if(!this.isNetConnected) {
EmptyComponent({
emptyType: 1,
emptyButton: true,
retry: () => {
this.getDetail()
}
})
}else{
if (!this.isPageEnd) {
detailedSkeleton()
}
}
//底部交互区
if (this.contentDetailData?.length) {
... ... @@ -163,6 +174,7 @@ export struct ImageAndTextPageComponent {
}
private async getDetail() {
this.isNetConnected = NetworkUtil.isNetConnected()
let contentId: string = ''
let relId: string = ''
let relType: string = ''
... ...
... ... @@ -91,7 +91,6 @@ export struct SpacialTopicPageComponent {
}
.width(CommonConstants.FULL_WIDTH)
.height(CommonConstants.FULL_HEIGHT)
// .padding({ bottom: 76 })
if (!this.isPageEnd) {
detailedSkeleton()
... ...