Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
wangliang_wd
2024-06-26 14:15:44 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f6fd3713787c21cefb969fb8eae06d68cd3541b8
f6fd3713
1 parent
9bd124af
feat:优化人名号主页缺省图显示
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
2 deletions
sight_harmony/features/wdComponent/src/main/ets/components/page/PeopleShipHomePage.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/EmptyComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/PeopleShipHomePage.ets
View file @
f6fd371
...
...
@@ -13,7 +13,7 @@ import {
PeopleShipUserDetailData,
ArticleCountData
} from 'wdBean'
import { EmptyComponent } from '../view/EmptyComponent'
import { EmptyComponent
,WDViewDefaultType
} from '../view/EmptyComponent'
import { CustomTitleUI } from '../reusable/CustomTitleUI'
@Entry
...
...
@@ -41,6 +41,7 @@ struct PeopleShipHomePage {
@State isLoading: boolean = true
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State isConnectNetwork : boolean = NetworkUtil.isNetConnected()
@State isHasHomePage: boolean = true
onPageShow(): void {
WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff'})
...
...
@@ -60,6 +61,7 @@ struct PeopleShipHomePage {
build() {
if(this.isConnectNetwork){
if (this.isHasHomePage){
Stack({ alignContent: Alignment.TopStart }) {
Stack({ alignContent: Alignment.Top }){
// 顶部图片
...
...
@@ -145,6 +147,14 @@ struct PeopleShipHomePage {
.margin({top:px2vp(this.topSafeHeight)})
}
.width('100%')
}else {
Column(){
CustomTitleUI({ titleName: "" })
EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NoUserHomepage}).height('70%')
}.width("100%")
.height("100%")
.padding({top:px2vp(this.topSafeHeight)})
}
}else{
Column(){
CustomTitleUI({ titleName: "" })
...
...
@@ -184,6 +194,7 @@ struct PeopleShipHomePage {
} catch (exception) {
this.isLoading = false
this.isHasHomePage = false
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/EmptyComponent.ets
View file @
f6fd371
...
...
@@ -44,7 +44,9 @@ export const enum WDViewDefaultType {
// 17. 暂无评论快来抢沙发
WDViewDefaultType_NoComment1,
// 18. 内容找不到了
WDViewDefaultType_NoContent2
WDViewDefaultType_NoContent2,
// 19. 暂时无法查看该创作者主页
WDViewDefaultType_NoUserHomepage
}
/**
...
...
@@ -213,6 +215,8 @@ export struct EmptyComponent {
contentString = '暂无评论,快来抢沙发'
} else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoContent2) {
contentString = '内容找不到了'
} else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoUserHomepage){
contentString = '暂时无法查看该创作者主页'
}
return contentString
...
...
@@ -249,6 +253,8 @@ export struct EmptyComponent {
this.emptyType === WDViewDefaultType.WDViewDefaultType_NoFollow ||
this.emptyType === WDViewDefaultType.WDViewDefaultType_NoContent2) {
imageString = $r('app.media.icon_no_appointmentMade1')
}else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoUserHomepage){
imageString = $r('app.media.icon_no_master1')
}
return imageString
}
...
...
Please
register
or
login
to post a comment