Showing
2 changed files
with
13 additions
and
7 deletions
| @@ -104,7 +104,7 @@ export class ContentDTO implements BaseDTO { | @@ -104,7 +104,7 @@ export class ContentDTO implements BaseDTO { | ||
| 104 | //底部导航栏 id(用于频道跳转) | 104 | //底部导航栏 id(用于频道跳转) |
| 105 | bottomNavId: string = ''; | 105 | bottomNavId: string = ''; |
| 106 | // 链接类型: 0:无链接;1:内链(文章);2:外链 | 106 | // 链接类型: 0:无链接;1:内链(文章);2:外链 |
| 107 | - openType: string = ''; | 107 | + openType: string = '1'; |
| 108 | extra: string = '' | 108 | extra: string = '' |
| 109 | sameContentList:ContentDTO[] = [] | 109 | sameContentList:ContentDTO[] = [] |
| 110 | sameContentListJson:string = "" | 110 | sameContentListJson:string = "" |
| @@ -9,6 +9,8 @@ const TAG = 'DefaultWebPage' | @@ -9,6 +9,8 @@ const TAG = 'DefaultWebPage' | ||
| 9 | @Entry | 9 | @Entry |
| 10 | @Component | 10 | @Component |
| 11 | struct DefaultWebPage { | 11 | struct DefaultWebPage { |
| 12 | + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') as number; | ||
| 13 | + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | ||
| 12 | webviewControl: BridgeWebViewControl = new BridgeWebViewControl() | 14 | webviewControl: BridgeWebViewControl = new BridgeWebViewControl() |
| 13 | scroller: Scroller = new Scroller(); | 15 | scroller: Scroller = new Scroller(); |
| 14 | action: Action = {} as Action | 16 | action: Action = {} as Action |
| @@ -24,24 +26,28 @@ struct DefaultWebPage { | @@ -24,24 +26,28 @@ struct DefaultWebPage { | ||
| 24 | isPageEnd: $isPageEnd | 26 | isPageEnd: $isPageEnd |
| 25 | }) | 27 | }) |
| 26 | }.layoutWeight(1) | 28 | }.layoutWeight(1) |
| 27 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP]) | 29 | + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP]) |
| 28 | 30 | ||
| 29 | Row() { | 31 | Row() { |
| 30 | - Button({type: ButtonType.Normal}) { | 32 | + Button({ type: ButtonType.Normal }) { |
| 31 | Image($r("app.media.back_icon_black")) | 33 | Image($r("app.media.back_icon_black")) |
| 32 | .width(20).height(25) | 34 | .width(20).height(25) |
| 33 | }.height(44).width(44) | 35 | }.height(44).width(44) |
| 34 | .backgroundColor(Color.White) | 36 | .backgroundColor(Color.White) |
| 35 | - .onClick(() => { | ||
| 36 | - router.back() | ||
| 37 | - }) | 37 | + .onClick(() => { |
| 38 | + router.back() | ||
| 39 | + }) | ||
| 40 | + | ||
| 38 | Blank() | 41 | Blank() |
| 39 | }.width("100%").height(44) | 42 | }.width("100%").height(44) |
| 40 | .alignItems(VerticalAlign.Center) | 43 | .alignItems(VerticalAlign.Center) |
| 41 | .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) | 44 | .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) |
| 42 | } | 45 | } |
| 43 | .width(CommonConstants.FULL_WIDTH) | 46 | .width(CommonConstants.FULL_WIDTH) |
| 44 | - .height(CommonConstants.FULL_HEIGHT) | 47 | + .height(CommonConstants.FULL_HEIGHT).padding({ |
| 48 | + top: px2vp(this.topSafeHeight), | ||
| 49 | + bottom: px2vp(this.bottomSafeHeight) | ||
| 50 | + }) | ||
| 45 | } | 51 | } |
| 46 | 52 | ||
| 47 | aboutToAppear() { | 53 | aboutToAppear() { |
-
Please register or login to post a comment