张善主

fix(动态详情):顶部底部适配

@@ -82,6 +82,9 @@ export struct DynamicDetailComponent { @@ -82,6 +82,9 @@ export struct DynamicDetailComponent {
82 @State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以 82 @State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以
83 83
84 pageParam: ParamType = {} 84 pageParam: ParamType = {}
  85 +
  86 + // @Provide bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
  87 + @Provide topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
85 async aboutToAppear() { 88 async aboutToAppear() {
86 await this.getContentDetailData() 89 await this.getContentDetailData()
87 // 内容用 点赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 90 // 内容用 点赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
@@ -112,7 +115,7 @@ export struct DynamicDetailComponent { @@ -112,7 +115,7 @@ export struct DynamicDetailComponent {
112 .width('100%') 115 .width('100%')
113 .alignItems(VerticalAlign.Bottom) 116 .alignItems(VerticalAlign.Bottom)
114 .padding({ bottom: 5 }) 117 .padding({ bottom: 5 })
115 - 118 + .margin({top: `${this.topSafeHeight}px`})
116 //分割线 119 //分割线
117 Image($r('app.media.ic_news_detail_division')) 120 Image($r('app.media.ic_news_detail_division'))
118 .width('100%') 121 .width('100%')
@@ -570,6 +573,7 @@ export struct DynamicDetailComponent { @@ -570,6 +573,7 @@ export struct DynamicDetailComponent {
570 }) 573 })
571 .height(100) 574 .height(100)
572 } 575 }
  576 + .margin({bottom: 65})
573 } 577 }
574 .alignSelf(ItemAlign.Start) 578 .alignSelf(ItemAlign.Start)
575 .backgroundColor('#FFFFFFFF') 579 .backgroundColor('#FFFFFFFF')