Showing
2 changed files
with
14 additions
and
3 deletions
| @@ -23,6 +23,7 @@ import { ErrorComponent } from '../view/ErrorComponent' | @@ -23,6 +23,7 @@ import { ErrorComponent } from '../view/ErrorComponent' | ||
| 23 | import { CustomPullToRefresh } from '../reusable/CustomPullToRefresh' | 23 | import { CustomPullToRefresh } from '../reusable/CustomPullToRefresh' |
| 24 | import { PeopleShipNoMoreData } from '../reusable/PeopleShipNoMoreData' | 24 | import { PeopleShipNoMoreData } from '../reusable/PeopleShipNoMoreData' |
| 25 | import LoadMoreLayout from '../page/LoadMoreLayout' | 25 | import LoadMoreLayout from '../page/LoadMoreLayout' |
| 26 | +import { EmptyComponent, WDViewDefaultType } from '../view/EmptyComponent' | ||
| 26 | 27 | ||
| 27 | const TAG = 'PeopleShipHomeArticleListComponent'; | 28 | const TAG = 'PeopleShipHomeArticleListComponent'; |
| 28 | 29 | ||
| @@ -49,7 +50,12 @@ export struct PeopleShipHomeArticleListComponent { | @@ -49,7 +50,12 @@ export struct PeopleShipHomeArticleListComponent { | ||
| 49 | this.LoadingLayout() | 50 | this.LoadingLayout() |
| 50 | } else if (this.viewType == 2) { | 51 | } else if (this.viewType == 2) { |
| 51 | ErrorComponent() | 52 | ErrorComponent() |
| 52 | - } else { | 53 | + }else if(this.viewType == 4){ |
| 54 | + Column(){ | ||
| 55 | + EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NoCreation}).height('40%') | ||
| 56 | + }.width('100%') | ||
| 57 | + .height('100%') | ||
| 58 | + } else { | ||
| 53 | CustomPullToRefresh({ | 59 | CustomPullToRefresh({ |
| 54 | alldata:this.arr, | 60 | alldata:this.arr, |
| 55 | scroller:this.scroller, | 61 | scroller:this.scroller, |
| @@ -182,6 +188,11 @@ export struct PeopleShipHomeArticleListComponent { | @@ -182,6 +188,11 @@ export struct PeopleShipHomeArticleListComponent { | ||
| 182 | } | 188 | } |
| 183 | this.isLoading = false | 189 | this.isLoading = false |
| 184 | this.queryArticleContentInteractCount(listData) | 190 | this.queryArticleContentInteractCount(listData) |
| 191 | + | ||
| 192 | + ///展示缺省图 | ||
| 193 | + if (listData.totalCount === 0) { | ||
| 194 | + this.viewType = 4 | ||
| 195 | + } | ||
| 185 | Logger.debug(TAG, '展示的总数'+`${this.arr.length}`) | 196 | Logger.debug(TAG, '展示的总数'+`${this.arr.length}`) |
| 186 | }catch (exception) { | 197 | }catch (exception) { |
| 187 | if (resolve) { | 198 | if (resolve) { |
| @@ -5,7 +5,7 @@ export struct PeopleShipHomePageAttestationComponent { | @@ -5,7 +5,7 @@ export struct PeopleShipHomePageAttestationComponent { | ||
| 5 | build() { | 5 | build() { |
| 6 | Row() { | 6 | Row() { |
| 7 | Text(this.name) | 7 | Text(this.name) |
| 8 | - .lineHeight('18vp') | 8 | + .lineHeight('15vp') |
| 9 | .fontColor($r('app.color.color_ED2800')) | 9 | .fontColor($r('app.color.color_ED2800')) |
| 10 | .fontSize($r('app.float.vp_11')) | 10 | .fontSize($r('app.float.vp_11')) |
| 11 | .backgroundColor($r('app.color.color_1AED2800')) | 11 | .backgroundColor($r('app.color.color_1AED2800')) |
| @@ -23,7 +23,7 @@ export struct PeopleShipHomePageAttestationComponent { | @@ -23,7 +23,7 @@ export struct PeopleShipHomePageAttestationComponent { | ||
| 23 | }) | 23 | }) |
| 24 | 24 | ||
| 25 | Text(this.content) | 25 | Text(this.content) |
| 26 | - .lineHeight('18vp') | 26 | + .lineHeight('15vp') |
| 27 | .fontSize($r('app.float.vp_12')) | 27 | .fontSize($r('app.float.vp_12')) |
| 28 | .layoutWeight(1) | 28 | .layoutWeight(1) |
| 29 | .fontColor($r('app.color.color_222222')) | 29 | .fontColor($r('app.color.color_222222')) |
-
Please register or login to post a comment