王士厅
@@ -13,7 +13,7 @@ const TAG: string = 'Card9Component'; @@ -13,7 +13,7 @@ const TAG: string = 'Card9Component';
13 @Component 13 @Component
14 export struct Card9Component { 14 export struct Card9Component {
15 @State contentDTO: ContentDTO = new ContentDTO(); 15 @State contentDTO: ContentDTO = new ContentDTO();
16 - @State loadImg: boolean = false; 16 + @State loadImg: boolean = true;
17 @State clicked: boolean = false; 17 @State clicked: boolean = false;
18 @State titleMarked: boolean = false; 18 @State titleMarked: boolean = false;
19 @State str01: string = ''; 19 @State str01: string = '';
@@ -22,7 +22,7 @@ export struct Card9Component { @@ -22,7 +22,7 @@ export struct Card9Component {
22 22
23 async aboutToAppear(): Promise<void> { 23 async aboutToAppear(): Promise<void> {
24 this.titleInit(); 24 this.titleInit();
25 - this.loadImg = await onlyWifiLoadImg(); 25 + // this.loadImg = await onlyWifiLoadImg();
26 } 26 }
27 27
28 titleInit() { 28 titleInit() {
@@ -31,7 +31,6 @@ export struct SearchComponent { @@ -31,7 +31,6 @@ export struct SearchComponent {
31 scroller: Scroller = new Scroller() 31 scroller: Scroller = new Scroller()
32 @State count:string[] = [] 32 @State count:string[] = []
33 @State isGetRequest:boolean = false; 33 @State isGetRequest:boolean = false;
34 - @State isConnectNetwork : boolean = NetworkUtil.isNetConnected()  
35 34
36 aboutToAppear() { 35 aboutToAppear() {
37 //获取提示滚动 36 //获取提示滚动
@@ -129,16 +128,8 @@ export struct SearchComponent { @@ -129,16 +128,8 @@ export struct SearchComponent {
129 .padding({ left: '31lpx', right: '31lpx' }) 128 .padding({ left: '31lpx', right: '31lpx' })
130 } else { 129 } else {
131 if (this.hasChooseSearch) { 130 if (this.hasChooseSearch) {
132 - if(!this.isConnectNetwork){  
133 - EmptyComponent({ emptyType: 1,emptyHeight:"100%" ,retry: () => {  
134 - this.getSearchInputResData(this.searchText)  
135 - }})  
136 - .layoutWeight(1)  
137 - .width('100%')  
138 - }else{  
139 - //搜索结果  
140 - SearchResultComponent({count:this.count,searchText:this.searchText,isGetRequest:this.isGetRequest})  
141 - } 131 + //搜索结果
  132 + SearchResultComponent({count:this.count,searchText:this.searchText,isGetRequest:this.isGetRequest})
142 } else { 133 } else {
143 //联想搜索 134 //联想搜索
144 SearchRelatedComponent({relatedSearchContentData:$relatedSearchContentsData,onGetSearchRes: (item): void => this.getSearchRelatedResData(item),searchText:this.searchText}) 135 SearchRelatedComponent({relatedSearchContentData:$relatedSearchContentsData,onGetSearchRes: (item): void => this.getSearchRelatedResData(item),searchText:this.searchText})
@@ -339,12 +330,10 @@ export struct SearchComponent { @@ -339,12 +330,10 @@ export struct SearchComponent {
339 } 330 }
340 this.isGetRequest = true 331 this.isGetRequest = true
341 this.resetSearch() 332 this.resetSearch()
342 - this.isConnectNetwork = NetworkUtil.isNetConnected()  
343 }).catch((err: Error) => { 333 }).catch((err: Error) => {
344 console.log(TAG, JSON.stringify(err)) 334 console.log(TAG, JSON.stringify(err))
345 this.isGetRequest = true 335 this.isGetRequest = true
346 this.resetSearch() 336 this.resetSearch()
347 - this.isConnectNetwork = NetworkUtil.isNetConnected()  
348 }) 337 })
349 } 338 }
350 339
@@ -230,7 +230,7 @@ export struct EmptyComponent { @@ -230,7 +230,7 @@ export struct EmptyComponent {
230 this.emptyType === WDViewDefaultType.WDViewDefaultType_NoHistory) { 230 this.emptyType === WDViewDefaultType.WDViewDefaultType_NoHistory) {
231 imageString = $r('app.media.icon_no_collection') 231 imageString = $r('app.media.icon_no_collection')
232 } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoMessage) { 232 } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoMessage) {
233 - imageString = $r('app.media.icon_no_message') 233 + imageString = $r('app.media.icon_no_message1')
234 } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoComment || 234 } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoComment ||
235 this.emptyType === WDViewDefaultType.WDViewDefaultType_NoComment1) { 235 this.emptyType === WDViewDefaultType.WDViewDefaultType_NoComment1) {
236 imageString = $r('app.media.icon_no_comment') 236 imageString = $r('app.media.icon_no_comment')