yangchenggong1_wd

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

@@ -84,11 +84,13 @@ export struct SubscribeListChildComponent{ @@ -84,11 +84,13 @@ export struct SubscribeListChildComponent{
84 84
85 }.backgroundColor($r('app.color.white')) 85 }.backgroundColor($r('app.color.white'))
86 .borderRadius("8lpx") 86 .borderRadius("8lpx")
  87 + .height("336lpx")
87 .width("100%") 88 .width("100%")
88 .padding({left:"23lpx",right:"23lpx"}) 89 .padding({left:"23lpx",right:"23lpx"})
89 } 90 }
90 .backgroundColor($r('app.color.color_F5F5F5')) 91 .backgroundColor($r('app.color.color_F5F5F5'))
91 .width("100%") 92 .width("100%")
  93 + .height("423lpx")
92 .padding({left:"31lpx",right:"31lpx"}) 94 .padding({left:"31lpx",right:"31lpx"})
93 .alignItems(HorizontalAlign.Center) 95 .alignItems(HorizontalAlign.Center)
94 } 96 }
@@ -21,6 +21,7 @@ export struct SubscribeMessageComponent{ @@ -21,6 +21,7 @@ export struct SubscribeMessageComponent{
21 curPageNum: number = 1; 21 curPageNum: number = 1;
22 @State isGetRequest: boolean = false 22 @State isGetRequest: boolean = false
23 private scroller: Scroller = new Scroller(); 23 private scroller: Scroller = new Scroller();
  24 + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
24 25
25 aboutToAppear() { 26 aboutToAppear() {
26 this.getNewPageData() 27 this.getNewPageData()
@@ -60,6 +61,8 @@ export struct SubscribeMessageComponent{ @@ -60,6 +61,8 @@ export struct SubscribeMessageComponent{
60 } 61 }
61 } 62 }
62 }) 63 })
  64 + .width('100%')
  65 + .margin({bottom:px2vp(this.bottomSafeHeight)})
63 } 66 }
64 } 67 }
65 .backgroundColor($r('app.color.color_F9F9F9')) 68 .backgroundColor($r('app.color.color_F9F9F9'))
@@ -94,7 +97,7 @@ export struct SubscribeMessageComponent{ @@ -94,7 +97,7 @@ export struct SubscribeMessageComponent{
94 } 97 }
95 } 98 }
96 }.width('100%') 99 }.width('100%')
97 - .cachedCount(4) 100 + .height("100%")
98 .scrollBar(BarState.Off) 101 .scrollBar(BarState.Off)
99 .layoutWeight(1) 102 .layoutWeight(1)
100 } 103 }
@@ -38,16 +38,30 @@ struct PeopleShipHomePage { @@ -38,16 +38,30 @@ struct PeopleShipHomePage {
38 @State attentionOpacity: boolean = false 38 @State attentionOpacity: boolean = false
39 @Provide topHeight: number = 286 39 @Provide topHeight: number = 286
40 @State isLoading: boolean = true 40 @State isLoading: boolean = true
  41 + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
41 42
42 build() { 43 build() {
43 Stack({ alignContent: Alignment.TopStart }) { 44 Stack({ alignContent: Alignment.TopStart }) {
44 - // 顶部图片  
45 - Image($r('app.media.home_page_bg'))  
46 - .width('100%')  
47 - .height('120vp')  
48 - .objectFit(ImageFit.Fill)  
49 - .backgroundColor(Color.White)  
50 - .visibility(this.isLoading ? Visibility.None : Visibility.Visible) 45 + Stack({ alignContent: Alignment.Top }){
  46 + // 顶部图片
  47 + Image($r('app.media.home_page_bg'))
  48 + .width('100%')
  49 + .height('120vp')
  50 + .objectFit(ImageFit.Fill)
  51 + .backgroundColor(Color.White)
  52 + .visibility(this.isLoading ? Visibility.None : Visibility.Visible)
  53 + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
  54 +
  55 + Row()
  56 + .height(px2vp(this.topSafeHeight))
  57 + .width("100%")
  58 + .backgroundColor($r('app.color.white'))
  59 + .visibility(this.attentionOpacity ? 1 : 0)
  60 + .opacity(this.topOpacity )
  61 + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
  62 + }
  63 +
  64 +
51 65
52 Column(){ 66 Column(){
53 // 头部返回 67 // 头部返回
@@ -109,7 +123,7 @@ struct PeopleShipHomePage { @@ -109,7 +123,7 @@ struct PeopleShipHomePage {
109 }) 123 })
110 } 124 }
111 125
112 - } 126 + }.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
113 .alignItems(HorizontalAlign.Start) 127 .alignItems(HorizontalAlign.Start)
114 .justifyContent(FlexAlign.Start) 128 .justifyContent(FlexAlign.Start)
115 .width('100%') 129 .width('100%')
@@ -9,6 +9,7 @@ struct SubscribeMessagePage { @@ -9,6 +9,7 @@ struct SubscribeMessagePage {
9 build() { 9 build() {
10 Column(){ 10 Column(){
11 SubscribeMessageComponent() 11 SubscribeMessageComponent()
12 - } 12 + }.height("100%")
  13 + .width("100%")
13 } 14 }
14 } 15 }