yangchenggong1_wd

fix:bug[17461] 无网络时进入我的预约下,鸿蒙版显示的缺省图与安卓不一致

... ... @@ -2,7 +2,7 @@ import { AppointmentListChildComponent } from './AppointmentListChildComponent';
import { CustomTitleUI } from '../../reusable/CustomTitleUI'
import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI';
import { MineAppointmentItem } from '../../../viewmodel/MineAppointmentItem';
import { LazyDataSource, StringUtils } from 'wdKit';
import { LazyDataSource, NetworkUtil, StringUtils } from 'wdKit';
import MinePageDatasModel from '../../../model/MinePageDatasModel';
import { EmptyComponent } from '../../view/EmptyComponent';
import { Action, ContentDTO } from 'wdBean/Index';
... ... @@ -23,6 +23,7 @@ export struct AppointmentListUI {
curPageNum: number = 1;
@State isGetRequest: boolean = false
private scroller: Scroller = new Scroller();
@State isConnectNetwork : boolean = NetworkUtil.isNetConnected()
aboutToAppear() {
this.getNewPageData()
... ... @@ -34,13 +35,29 @@ export struct AppointmentListUI {
CustomTitleUI({ titleName: "我的预约" })
if (this.count == 0) {
if (this.isGetRequest == true) {
if(this.isConnectNetwork){
EmptyComponent({ emptyType: 10 })
.height('100%')
.width('100%')
}
}else{
EmptyComponent({ emptyType: 1,emptyHeight:"100%" ,retry: () => {
this.isConnectNetwork = NetworkUtil.isNetConnected()
if(this.isConnectNetwork){
this.curPageNum = 1;
this.hasMore = true
this.isGetRequest = false
this.data.clear()
if (!this.isLoading) {
this.getNewPageData()
}
}
},})
.layoutWeight(1)
.width('100%')
}
}
} else {
CustomPullToRefresh({
alldata:this.data,
scroller:this.scroller,
... ...