Showing
2 changed files
with
20 additions
and
6 deletions
| @@ -86,7 +86,7 @@ export struct FollowFirstTabsComponent{ | @@ -86,7 +86,7 @@ export struct FollowFirstTabsComponent{ | ||
| 86 | if(!this.isConnectNetwork){ | 86 | if(!this.isConnectNetwork){ |
| 87 | EmptyComponent({ emptyType: 1,emptyHeight:"100%" ,retry: () => { | 87 | EmptyComponent({ emptyType: 1,emptyHeight:"100%" ,retry: () => { |
| 88 | this.reloadNetWork() | 88 | this.reloadNetWork() |
| 89 | - },}) | 89 | + }}) |
| 90 | .layoutWeight(1) | 90 | .layoutWeight(1) |
| 91 | .width('100%') | 91 | .width('100%') |
| 92 | }else{ | 92 | }else{ |
| 1 | import router from '@ohos.router' | 1 | import router from '@ohos.router' |
| 2 | import { PeopleShipHomePageNavComponent } from '../peopleShipHomePage/PeopleShipHomeNavComponent' | 2 | import { PeopleShipHomePageNavComponent } from '../peopleShipHomePage/PeopleShipHomeNavComponent' |
| 3 | import { PeopleShipHomePageTopComponent } from '../peopleShipHomePage/PeopleShipHomePageTopComponent' | 3 | import { PeopleShipHomePageTopComponent } from '../peopleShipHomePage/PeopleShipHomePageTopComponent' |
| 4 | -import { Logger, WindowModel } from 'wdKit' | 4 | +import { Logger, NetworkUtil, WindowModel } from 'wdKit' |
| 5 | import { PeopleShipHomePageDataModel } from '../../viewmodel/PeopleShipHomePageDataModel' | 5 | import { PeopleShipHomePageDataModel } from '../../viewmodel/PeopleShipHomePageDataModel' |
| 6 | import { PeopleShipHomeListComponent } from '../peopleShipHomePage/PeopleShipHomeListComponent' | 6 | import { PeopleShipHomeListComponent } from '../peopleShipHomePage/PeopleShipHomeListComponent' |
| 7 | import { QueryListIsFollowedItem } from '../../viewmodel/QueryListIsFollowedItem' | 7 | import { QueryListIsFollowedItem } from '../../viewmodel/QueryListIsFollowedItem' |
| @@ -14,6 +14,7 @@ import { | @@ -14,6 +14,7 @@ import { | ||
| 14 | ArticleCountData | 14 | ArticleCountData |
| 15 | } from 'wdBean' | 15 | } from 'wdBean' |
| 16 | import { EmptyComponent } from '../view/EmptyComponent' | 16 | import { EmptyComponent } from '../view/EmptyComponent' |
| 17 | +import { CustomTitleUI } from '../reusable/CustomTitleUI' | ||
| 17 | 18 | ||
| 18 | @Entry | 19 | @Entry |
| 19 | @Component | 20 | @Component |
| @@ -39,8 +40,10 @@ struct PeopleShipHomePage { | @@ -39,8 +40,10 @@ struct PeopleShipHomePage { | ||
| 39 | @Provide topHeight: number = 214 | 40 | @Provide topHeight: number = 214 |
| 40 | @State isLoading: boolean = true | 41 | @State isLoading: boolean = true |
| 41 | @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | 42 | @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 |
| 43 | + @State isConnectNetwork : boolean = NetworkUtil.isNetConnected() | ||
| 42 | 44 | ||
| 43 | build() { | 45 | build() { |
| 46 | + if(this.isConnectNetwork){ | ||
| 44 | Stack({ alignContent: Alignment.TopStart }) { | 47 | Stack({ alignContent: Alignment.TopStart }) { |
| 45 | Stack({ alignContent: Alignment.Top }){ | 48 | Stack({ alignContent: Alignment.Top }){ |
| 46 | // 顶部图片 | 49 | // 顶部图片 |
| @@ -61,8 +64,6 @@ struct PeopleShipHomePage { | @@ -61,8 +64,6 @@ struct PeopleShipHomePage { | ||
| 61 | .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP]) | 64 | .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP]) |
| 62 | } | 65 | } |
| 63 | 66 | ||
| 64 | - | ||
| 65 | - | ||
| 66 | Column(){ | 67 | Column(){ |
| 67 | // 头部返回 | 68 | // 头部返回 |
| 68 | PeopleShipHomePageNavComponent({ | 69 | PeopleShipHomePageNavComponent({ |
| @@ -122,7 +123,6 @@ struct PeopleShipHomePage { | @@ -122,7 +123,6 @@ struct PeopleShipHomePage { | ||
| 122 | 123 | ||
| 123 | }) | 124 | }) |
| 124 | } | 125 | } |
| 125 | - | ||
| 126 | } | 126 | } |
| 127 | .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) | 127 | .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) |
| 128 | .alignItems(HorizontalAlign.Start) | 128 | .alignItems(HorizontalAlign.Start) |
| @@ -130,7 +130,21 @@ struct PeopleShipHomePage { | @@ -130,7 +130,21 @@ struct PeopleShipHomePage { | ||
| 130 | .width('100%') | 130 | .width('100%') |
| 131 | } | 131 | } |
| 132 | .width('100%') | 132 | .width('100%') |
| 133 | - | 133 | + }else{ |
| 134 | + Column(){ | ||
| 135 | + CustomTitleUI({ titleName: "" }) | ||
| 136 | + EmptyComponent({ emptyType: 1,emptyHeight:"100%" ,retry: () => { | ||
| 137 | + this.isConnectNetwork = NetworkUtil.isNetConnected() | ||
| 138 | + if(this.isConnectNetwork){ | ||
| 139 | + this.detailModel = {} as PeopleShipUserDetailData | ||
| 140 | + this.getData() | ||
| 141 | + } | ||
| 142 | + }}) | ||
| 143 | + .height('calc(100% - 84lpx)') | ||
| 144 | + .width('100%') | ||
| 145 | + }.width("100%") | ||
| 146 | + .height("100%") | ||
| 147 | + } | ||
| 134 | } | 148 | } |
| 135 | 149 | ||
| 136 | aboutToAppear() { | 150 | aboutToAppear() { |
-
Please register or login to post a comment