王士厅
... ... @@ -13,7 +13,7 @@ const TAG: string = 'Card9Component';
@Component
export struct Card9Component {
@State contentDTO: ContentDTO = new ContentDTO();
@State loadImg: boolean = false;
@State loadImg: boolean = true;
@State clicked: boolean = false;
@State titleMarked: boolean = false;
@State str01: string = '';
... ... @@ -22,7 +22,7 @@ export struct Card9Component {
async aboutToAppear(): Promise<void> {
this.titleInit();
this.loadImg = await onlyWifiLoadImg();
// this.loadImg = await onlyWifiLoadImg();
}
titleInit() {
... ...
... ... @@ -31,7 +31,6 @@ export struct SearchComponent {
scroller: Scroller = new Scroller()
@State count:string[] = []
@State isGetRequest:boolean = false;
@State isConnectNetwork : boolean = NetworkUtil.isNetConnected()
aboutToAppear() {
//获取提示滚动
... ... @@ -129,16 +128,8 @@ export struct SearchComponent {
.padding({ left: '31lpx', right: '31lpx' })
} else {
if (this.hasChooseSearch) {
if(!this.isConnectNetwork){
EmptyComponent({ emptyType: 1,emptyHeight:"100%" ,retry: () => {
this.getSearchInputResData(this.searchText)
}})
.layoutWeight(1)
.width('100%')
}else{
//搜索结果
SearchResultComponent({count:this.count,searchText:this.searchText,isGetRequest:this.isGetRequest})
}
} else {
//联想搜索
SearchRelatedComponent({relatedSearchContentData:$relatedSearchContentsData,onGetSearchRes: (item): void => this.getSearchRelatedResData(item),searchText:this.searchText})
... ... @@ -339,12 +330,10 @@ export struct SearchComponent {
}
this.isGetRequest = true
this.resetSearch()
this.isConnectNetwork = NetworkUtil.isNetConnected()
}).catch((err: Error) => {
console.log(TAG, JSON.stringify(err))
this.isGetRequest = true
this.resetSearch()
this.isConnectNetwork = NetworkUtil.isNetConnected()
})
}
... ...
... ... @@ -230,7 +230,7 @@ export struct EmptyComponent {
this.emptyType === WDViewDefaultType.WDViewDefaultType_NoHistory) {
imageString = $r('app.media.icon_no_collection')
} else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoMessage) {
imageString = $r('app.media.icon_no_message')
imageString = $r('app.media.icon_no_message1')
} else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoComment ||
this.emptyType === WDViewDefaultType.WDViewDefaultType_NoComment1) {
imageString = $r('app.media.icon_no_comment')
... ...