yangchenggong1_wd

fix:bug[17795] 早晚报>多图类型稿件详情页,进入号主页_顶部展示与安卓效果不一致

... ... @@ -84,11 +84,13 @@ export struct SubscribeListChildComponent{
}.backgroundColor($r('app.color.white'))
.borderRadius("8lpx")
.height("336lpx")
.width("100%")
.padding({left:"23lpx",right:"23lpx"})
}
.backgroundColor($r('app.color.color_F5F5F5'))
.width("100%")
.height("423lpx")
.padding({left:"31lpx",right:"31lpx"})
.alignItems(HorizontalAlign.Center)
}
... ...
... ... @@ -21,6 +21,7 @@ export struct SubscribeMessageComponent{
curPageNum: number = 1;
@State isGetRequest: boolean = false
private scroller: Scroller = new Scroller();
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
aboutToAppear() {
this.getNewPageData()
... ... @@ -60,6 +61,8 @@ export struct SubscribeMessageComponent{
}
}
})
.width('100%')
.margin({bottom:px2vp(this.bottomSafeHeight)})
}
}
.backgroundColor($r('app.color.color_F9F9F9'))
... ... @@ -94,7 +97,7 @@ export struct SubscribeMessageComponent{
}
}
}.width('100%')
.cachedCount(4)
.height("100%")
.scrollBar(BarState.Off)
.layoutWeight(1)
}
... ...
... ... @@ -38,16 +38,30 @@ struct PeopleShipHomePage {
@State attentionOpacity: boolean = false
@Provide topHeight: number = 286
@State isLoading: boolean = true
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
build() {
Stack({ alignContent: Alignment.TopStart }) {
// 顶部图片
Image($r('app.media.home_page_bg'))
.width('100%')
.height('120vp')
.objectFit(ImageFit.Fill)
.backgroundColor(Color.White)
.visibility(this.isLoading ? Visibility.None : Visibility.Visible)
Stack({ alignContent: Alignment.Top }){
// 顶部图片
Image($r('app.media.home_page_bg'))
.width('100%')
.height('120vp')
.objectFit(ImageFit.Fill)
.backgroundColor(Color.White)
.visibility(this.isLoading ? Visibility.None : Visibility.Visible)
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
Row()
.height(px2vp(this.topSafeHeight))
.width("100%")
.backgroundColor($r('app.color.white'))
.visibility(this.attentionOpacity ? 1 : 0)
.opacity(this.topOpacity )
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
}
Column(){
// 头部返回
... ... @@ -109,7 +123,7 @@ struct PeopleShipHomePage {
})
}
}
}.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
.alignItems(HorizontalAlign.Start)
.justifyContent(FlexAlign.Start)
.width('100%')
... ...
... ... @@ -9,6 +9,7 @@ struct SubscribeMessagePage {
build() {
Column(){
SubscribeMessageComponent()
}
}.height("100%")
.width("100%")
}
}
\ No newline at end of file
... ...