张善主

Merge remote-tracking branch 'origin/main'

# Conflicts:
#	sight_harmony/features/wdComponent/src/main/ets/pages/MultiPictureListPage.ets
Showing 36 changed files with 155 additions and 50 deletions
@@ -135,6 +135,13 @@ export class WindowModel { @@ -135,6 +135,13 @@ export class WindowModel {
135 }) 135 })
136 } 136 }
137 137
  138 + /**
  139 + * 状态栏显示设置
  140 + */
  141 + setSpecificSystemBarEnabled(visible: boolean) {
  142 + this.windowClass?.setSpecificSystemBarEnabled('status', visible)
  143 + }
  144 +
138 setWindowSystemBarEnable(names: Array<'status' | 'navigation'>) { 145 setWindowSystemBarEnable(names: Array<'status' | 'navigation'>) {
139 this.windowClass?.setWindowSystemBarEnable(names) 146 this.windowClass?.setWindowSystemBarEnable(names)
140 } 147 }
1 import { CompStyle } from 'wdConstant'; 1 import { CompStyle } from 'wdConstant';
2 import { CompDTO, ContentDTO } from 'wdBean'; 2 import { CompDTO, ContentDTO } from 'wdBean';
3 import { Card2Component } from './cardview/Card2Component'; 3 import { Card2Component } from './cardview/Card2Component';
4 -import { Card3Component } from './cardview/Card3Component'; 4 +// import { Card3Component } from './cardview/Card3Component';
5 import { Card4Component } from './cardview/Card4Component'; 5 import { Card4Component } from './cardview/Card4Component';
6 import { Card5Component } from './cardview/Card5Component'; 6 import { Card5Component } from './cardview/Card5Component';
7 import { Card6Component } from './cardview/Card6Component'; 7 import { Card6Component } from './cardview/Card6Component';
@@ -60,14 +60,11 @@ export struct CardParser { @@ -60,14 +60,11 @@ export struct CardParser {
60 } else { 60 } else {
61 if (contentDTO.appStyle === CompStyle.Card_02) { 61 if (contentDTO.appStyle === CompStyle.Card_02) {
62 Card2Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName }) 62 Card2Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName })
63 - } else if (contentDTO.appStyle === CompStyle.Card_03) {  
64 - Card3Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName })  
65 } else if (contentDTO.appStyle === CompStyle.Card_04) { 63 } else if (contentDTO.appStyle === CompStyle.Card_04) {
66 Card4Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName }) 64 Card4Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName })
67 } else if (contentDTO.appStyle === CompStyle.Card_05) { 65 } else if (contentDTO.appStyle === CompStyle.Card_05) {
68 Card5Component({ compDTO: this.compDTO, contentDTO, titleShowPolicy: this.compDTO.titleShowPolicy, pageId: this.pageId, pageName: this.pageName}) 66 Card5Component({ compDTO: this.compDTO, contentDTO, titleShowPolicy: this.compDTO.titleShowPolicy, pageId: this.pageId, pageName: this.pageName})
69 - } else if (contentDTO.appStyle === CompStyle.Card_06 || contentDTO.appStyle === CompStyle  
70 - .Card_13) { 67 + } else if (contentDTO.appStyle === CompStyle.Card_06 ) {
71 Card6Component({ compDTO: this.compDTO, contentDTO: this.contentDTO, pageId: this.pageId, pageName: this.pageName }) 68 Card6Component({ compDTO: this.compDTO, contentDTO: this.contentDTO, pageId: this.pageId, pageName: this.pageName })
72 } else if (contentDTO.appStyle === CompStyle.Card_10) { 69 } else if (contentDTO.appStyle === CompStyle.Card_10) {
73 Card10Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName }) 70 Card10Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName })
@@ -4,7 +4,9 @@ import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; @@ -4,7 +4,9 @@ import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
4 import PageModel from '../viewmodel/PageModel'; 4 import PageModel from '../viewmodel/PageModel';
5 import { CardParser } from './CardParser'; 5 import { CardParser } from './CardParser';
6 import { Card2Component } from './cardview/Card2Component'; 6 import { Card2Component } from './cardview/Card2Component';
  7 +import { Card3Component } from './cardview/Card3Component';
7 import { Card9Component } from './cardview/Card9Component'; 8 import { Card9Component } from './cardview/Card9Component';
  9 +import { Card6Component } from './cardview/Card6Component';
8 import { Card5Component } from './cardview/Card5Component'; 10 import { Card5Component } from './cardview/Card5Component';
9 import { AdvCardParser } from './cardViewAdv/AdvCardParser'; 11 import { AdvCardParser } from './cardViewAdv/AdvCardParser';
10 import { ZhCarouselLayout01 } from './compview/ZhCarouselLayout01'; 12 import { ZhCarouselLayout01 } from './compview/ZhCarouselLayout01';
@@ -71,6 +73,7 @@ export struct CompParser { @@ -71,6 +73,7 @@ export struct CompParser {
71 73
72 build() { 74 build() {
73 Column() { 75 Column() {
  76 + //Text(JSON.stringify(this.compDTO.compStyle))
74 this.componentBuilder(); 77 this.componentBuilder();
75 } 78 }
76 } 79 }
@@ -140,7 +143,13 @@ export struct CompParser { @@ -140,7 +143,13 @@ export struct CompParser {
140 //时间链卡 143 //时间链卡
141 Card9Component({ compDTO: this.compDTO, contentDTO:this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName }) 144 Card9Component({ compDTO: this.compDTO, contentDTO:this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName })
142 Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) 145 Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
143 - } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_04) { 146 + } else if(this.compDTO.compStyle === CompStyle.Card_13){
  147 + Card6Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName })
  148 + Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
  149 + } else if(this.compDTO.compStyle === CompStyle.Card_03){
  150 + Card3Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName })
  151 + Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
  152 + }else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_04) {
144 ZhSingleColumn04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) 153 ZhSingleColumn04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
145 Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) 154 Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
146 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_05) { 155 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_05) {
@@ -86,9 +86,14 @@ export struct Card10Component { @@ -86,9 +86,14 @@ export struct Card10Component {
86 Column() { 86 Column() {
87 ForEach(this.contentDTO.slideShows, (item: slideShows, index: number) => { 87 ForEach(this.contentDTO.slideShows, (item: slideShows, index: number) => {
88 this.timelineItem(item, index) 88 this.timelineItem(item, index)
  89 + if (index < this.contentDTO.slideShows.length - 1) {
  90 + // 在不是最后一个元素的情况下添加分隔符
  91 + Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 0, right: 0 });
  92 + }
89 }) 93 })
90 } 94 }
91 95
  96 +
92 // 底部-查看更多。根据接口返回的isMore判断是否显示查看更多 97 // 底部-查看更多。根据接口返回的isMore判断是否显示查看更多
93 if (this.contentDTO.hasMore == 1) { 98 if (this.contentDTO.hasMore == 1) {
94 Row() { 99 Row() {
@@ -221,7 +221,9 @@ struct createImg { @@ -221,7 +221,9 @@ struct createImg {
221 }) { 221 }) {
222 Image(this.loadImg ? item.fullUrl : '') 222 Image(this.loadImg ? item.fullUrl : '')
223 .backgroundColor(0xf5f5f5) 223 .backgroundColor(0xf5f5f5)
224 - .aspectRatio(this.onePicW > this.onePicH ? 343 / 198 : 228 / 305) 224 + // .aspectRatio(this.onePicW > this.onePicH ? 343 / 198 : 228 / 305)
  225 + .width('100%')
  226 + .autoResize(true)
225 .autoResize(true) 227 .autoResize(true)
226 .borderRadius(this.caclImageRadius(index)) 228 .borderRadius(this.caclImageRadius(index))
227 .opacity(!item.weight && !item.height ? 0 : 1) 229 .opacity(!item.weight && !item.height ? 0 : 1)
@@ -279,6 +281,8 @@ struct createImg { @@ -279,6 +281,8 @@ struct createImg {
279 .backgroundColor(0xf5f5f5) 281 .backgroundColor(0xf5f5f5)
280 .aspectRatio(1) 282 .aspectRatio(1)
281 .borderRadius(this.caclImageRadius(index)) 283 .borderRadius(this.caclImageRadius(index))
  284 + .width('100%')
  285 + .autoResize(true)
282 if (this.getPicType(item.weight, item.height) !== 3) { 286 if (this.getPicType(item.weight, item.height) !== 3) {
283 Flex({ direction: FlexDirection.Row }) { 287 Flex({ direction: FlexDirection.Row }) {
284 Image($r('app.media.icon_long_pic')) 288 Image($r('app.media.icon_long_pic'))
@@ -108,7 +108,7 @@ export struct ZhSingleRow02 { @@ -108,7 +108,7 @@ export struct ZhSingleRow02 {
108 Column() { 108 Column() {
109 if (this.moreWidth > this.initMoreWidth + 2) { 109 if (this.moreWidth > this.initMoreWidth + 2) {
110 Text(this.moreTips) 110 Text(this.moreTips)
111 - .fontSize(8) 111 + .fontSize(9)
112 .fontColor(0x858585) 112 .fontColor(0x858585)
113 .width(8) 113 .width(8)
114 } 114 }
@@ -179,7 +179,7 @@ export struct ZhSingleRow03 { @@ -179,7 +179,7 @@ export struct ZhSingleRow03 {
179 Column() { 179 Column() {
180 if (this.moreWidth > this.initMoreWidth + 2) { 180 if (this.moreWidth > this.initMoreWidth + 2) {
181 Text(this.moreTips) 181 Text(this.moreTips)
182 - .fontSize(8) 182 + .fontSize(9)
183 .fontColor(0x858585) 183 .fontColor(0x858585)
184 .width(8) 184 .width(8)
185 } 185 }
@@ -63,7 +63,6 @@ export struct AppointmentListUI { @@ -63,7 +63,6 @@ export struct AppointmentListUI {
63 .width("100%") 63 .width("100%")
64 .height("100%") 64 .height("100%")
65 .backgroundColor($r('app.color.color_F9F9F9')) 65 .backgroundColor($r('app.color.color_F9F9F9'))
66 - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])  
67 CustomPullToRefresh({ 66 CustomPullToRefresh({
68 alldata:this.data, 67 alldata:this.data,
69 scroller:this.scroller, 68 scroller:this.scroller,
@@ -120,12 +120,11 @@ export struct FollowFirstTabsComponent{ @@ -120,12 +120,11 @@ export struct FollowFirstTabsComponent{
120 this.listScroller.scrollToIndex(index, true, ScrollAlign.CENTER) 120 this.listScroller.scrollToIndex(index, true, ScrollAlign.CENTER)
121 }) 121 })
122 .width('100%') 122 .width('100%')
123 - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])  
124 .layoutWeight(1) 123 .layoutWeight(1)
125 .loop(false) 124 .loop(false)
126 .indicator(false) 125 .indicator(false)
127 .effectMode(EdgeEffect.None) 126 .effectMode(EdgeEffect.None)
128 - }.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) 127 + }
129 } 128 }
130 }.width('100%') 129 }.width('100%')
131 .height("100%") 130 .height("100%")
@@ -101,7 +101,6 @@ export struct FollowListDetailUI { @@ -101,7 +101,6 @@ export struct FollowListDetailUI {
101 .margin({bottom:"40lpx"}) 101 .margin({bottom:"40lpx"})
102 } 102 }
103 } 103 }
104 - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])  
105 .edgeEffect(EdgeEffect.None) 104 .edgeEffect(EdgeEffect.None)
106 .cachedCount(5) 105 .cachedCount(5)
107 .padding({ left: '31lpx', right: '31lpx' }) 106 .padding({ left: '31lpx', right: '31lpx' })
@@ -27,7 +27,6 @@ export struct FollowSecondTabsComponent{ @@ -27,7 +27,6 @@ export struct FollowSecondTabsComponent{
27 .width("100%") 27 .width("100%")
28 .height("100%") 28 .height("100%")
29 .backgroundColor($r('app.color.color_transparent')) 29 .backgroundColor($r('app.color.color_transparent'))
30 - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])  
31 30
32 FollowListDetailUI({creatorDirectoryId:this.data[this.firstIndex].id,type:1}) 31 FollowListDetailUI({creatorDirectoryId:this.data[this.firstIndex].id,type:1})
33 .height("100%") 32 .height("100%")
@@ -40,7 +39,6 @@ export struct FollowSecondTabsComponent{ @@ -40,7 +39,6 @@ export struct FollowSecondTabsComponent{
40 .width("100%") 39 .width("100%")
41 .height("100%") 40 .height("100%")
42 .backgroundColor($r('app.color.color_transparent')) 41 .backgroundColor($r('app.color.color_transparent'))
43 - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])  
44 42
45 this.FollowSecondUI() 43 this.FollowSecondUI()
46 }.width("100%") 44 }.width("100%")
@@ -50,7 +48,6 @@ export struct FollowSecondTabsComponent{ @@ -50,7 +48,6 @@ export struct FollowSecondTabsComponent{
50 } 48 }
51 .width('100%') 49 .width('100%')
52 .layoutWeight(1) 50 .layoutWeight(1)
53 - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])  
54 } 51 }
55 52
56 @Builder FollowSecondUI(){ 53 @Builder FollowSecondUI(){
@@ -89,7 +86,6 @@ export struct FollowSecondTabsComponent{ @@ -89,7 +86,6 @@ export struct FollowSecondTabsComponent{
89 .effectMode(EdgeEffect.None) 86 .effectMode(EdgeEffect.None)
90 .height('100%') 87 .height('100%')
91 .layoutWeight(1) 88 .layoutWeight(1)
92 - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])  
93 }.width('100%') 89 }.width('100%')
94 } 90 }
95 91
@@ -122,7 +122,6 @@ export struct FollowThirdTabsComponent{ @@ -122,7 +122,6 @@ export struct FollowThirdTabsComponent{
122 }) 122 })
123 .width('100%') 123 .width('100%')
124 .layoutWeight(1) 124 .layoutWeight(1)
125 - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])  
126 } 125 }
127 } 126 }
128 127
1 -import { DateTimeUtils, StringUtils, ToastUtils } from 'wdKit/Index' 1 +import { DateTimeUtils } from 'wdKit/Index'
2 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index' 2 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'
3 import { Remark, WDMessageCenterMessageType } from '../../../model/InteractMessageModel' 3 import { Remark, WDMessageCenterMessageType } from '../../../model/InteractMessageModel'
4 import MinePageDatasModel from '../../../model/MinePageDatasModel' 4 import MinePageDatasModel from '../../../model/MinePageDatasModel'
@@ -7,7 +7,6 @@ import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh' @@ -7,7 +7,6 @@ import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh'
7 import { CustomTitleUI } from '../../reusable/CustomTitleUI' 7 import { CustomTitleUI } from '../../reusable/CustomTitleUI'
8 import { MessageListItemUI } from './MessageListItemUI' 8 import { MessageListItemUI } from './MessageListItemUI'
9 import {TrackingButton,TrackConstants}from 'wdTracking/Index' 9 import {TrackingButton,TrackConstants}from 'wdTracking/Index'
10 -import TrackingPageBrowseUtils from '../../../utils/TrackingPageBrowseUtils'  
11 10
12 const TAG = "MessageListUI" 11 const TAG = "MessageListUI"
13 12
@@ -57,6 +57,12 @@ export struct SubscribeMessageComponent{ @@ -57,6 +57,12 @@ export struct SubscribeMessageComponent{
57 } 57 }
58 } 58 }
59 } else { 59 } else {
  60 + Stack(){
  61 + Row()
  62 + .width("100%")
  63 + .height("100%")
  64 + .backgroundColor($r('app.color.color_F9F9F9'))
  65 +
60 CustomPullToRefresh({ 66 CustomPullToRefresh({
61 alldata:this.data, 67 alldata:this.data,
62 scroller:this.scroller, 68 scroller:this.scroller,
@@ -83,7 +89,8 @@ export struct SubscribeMessageComponent{ @@ -83,7 +89,8 @@ export struct SubscribeMessageComponent{
83 .width('100%') 89 .width('100%')
84 } 90 }
85 } 91 }
86 - .backgroundColor($r('app.color.color_F9F9F9')) 92 + }
  93 + .backgroundColor($r('app.color.color_transparent'))
87 .height('100%') 94 .height('100%')
88 .width('100%') 95 .width('100%')
89 } 96 }
@@ -9,6 +9,9 @@ const TAG = "AppointmentListPage" @@ -9,6 +9,9 @@ const TAG = "AppointmentListPage"
9 struct AppointmentListPage { 9 struct AppointmentListPage {
10 pageShowTime:number = 0; 10 pageShowTime:number = 0;
11 pageHideTime:number = 0; 11 pageHideTime:number = 0;
  12 + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
  13 + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
  14 +
12 15
13 onPageShow() { 16 onPageShow() {
14 this.pageShowTime = DateTimeUtils.getTimeStamp() 17 this.pageShowTime = DateTimeUtils.getTimeStamp()
@@ -23,7 +26,12 @@ struct AppointmentListPage { @@ -23,7 +26,12 @@ struct AppointmentListPage {
23 26
24 build() { 27 build() {
25 Column(){ 28 Column(){
  29 + Column(){
26 AppointmentListUI() 30 AppointmentListUI()
27 } 31 }
  32 + }.width("100%")
  33 + .height("100%")
  34 + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
  35 +
28 } 36 }
29 } 37 }
@@ -7,6 +7,7 @@ import { TrackConstants, @@ -7,6 +7,7 @@ import { TrackConstants,
7 TrackingButton, 7 TrackingButton,
8 TrackingContent, TrackingPageBrowse, TrackParamConvert } from 'wdTracking/Index'; 8 TrackingContent, TrackingPageBrowse, TrackParamConvert } from 'wdTracking/Index';
9 import { WDShare } from 'wdShare/Index'; 9 import { WDShare } from 'wdShare/Index';
  10 +import { hasClicked, persistentStorage } from '../../utils/persistentStorage';
10 11
11 const TAG: string = 'CardView'; 12 const TAG: string = 'CardView';
12 13
@@ -393,6 +394,7 @@ export struct MasonryLayout01CardView { @@ -393,6 +394,7 @@ export struct MasonryLayout01CardView {
393 export struct PaperSingleColumn999CardView { 394 export struct PaperSingleColumn999CardView {
394 private item: ContentDTO = new ContentDTO(); 395 private item: ContentDTO = new ContentDTO();
395 private index: number = -1; 396 private index: number = -1;
  397 + @State isRead: boolean = false;//已读状态
396 @State interactData: InteractDataDTO = {} as InteractDataDTO; 398 @State interactData: InteractDataDTO = {} as InteractDataDTO;
397 @Consume @Watch('onChangeCommentList') commentList: InteractDataDTO[] 399 @Consume @Watch('onChangeCommentList') commentList: InteractDataDTO[]
398 400
@@ -533,7 +535,7 @@ export struct PaperSingleColumn999CardView { @@ -533,7 +535,7 @@ export struct PaperSingleColumn999CardView {
533 } 535 }
534 if (this.item?.newsSummary) { 536 if (this.item?.newsSummary) {
535 Text(this.item?.newsSummary) 537 Text(this.item?.newsSummary)
536 - .fontColor('#6666666') 538 + .fontColor(this.isRead ? 0x848484 : '#222222')
537 .fontSize(14) 539 .fontSize(14)
538 .padding({ top: 10 }) 540 .padding({ top: 10 })
539 .alignSelf(ItemAlign.Start) 541 .alignSelf(ItemAlign.Start)
@@ -599,6 +601,8 @@ export struct PaperSingleColumn999CardView { @@ -599,6 +601,8 @@ export struct PaperSingleColumn999CardView {
599 .margin({ bottom: 10, left: 12, right: 12 }) 601 .margin({ bottom: 10, left: 12, right: 12 })
600 .borderRadius(4) 602 .borderRadius(4)
601 .onClick(() => { 603 .onClick(() => {
  604 + this.isRead = true
  605 + persistentStorage(this.item.objectId);
602 ProcessUtils.processPage(this.item) 606 ProcessUtils.processPage(this.item)
603 TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.SummaryType.MorningAndEveningNews,TrackConstants.SummaryType.MorningAndEveningNews,TrackParamConvert.program(this.item)) 607 TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.SummaryType.MorningAndEveningNews,TrackConstants.SummaryType.MorningAndEveningNews,TrackParamConvert.program(this.item))
604 }).onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => { 608 }).onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => {
@@ -610,6 +614,7 @@ export struct PaperSingleColumn999CardView { @@ -610,6 +614,7 @@ export struct PaperSingleColumn999CardView {
610 614
611 aboutToAppear(): void { 615 aboutToAppear(): void {
612 this.onChangeCommentList() 616 this.onChangeCommentList()
  617 + this.isRead = hasClicked(this.item.objectId)
613 } 618 }
614 619
615 onChangeCommentList() { 620 onChangeCommentList() {
@@ -11,6 +11,8 @@ struct FollowListPage { @@ -11,6 +11,8 @@ struct FollowListPage {
11 @State curIndex: string = '0'; 11 @State curIndex: string = '0';
12 pageShowTime:number = 0; 12 pageShowTime:number = 0;
13 pageHideTime:number = 0; 13 pageHideTime:number = 0;
  14 + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
  15 + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
14 16
15 onPageShow() { 17 onPageShow() {
16 this.curIndex = this.params?.['index']; 18 this.curIndex = this.params?.['index'];
@@ -25,6 +27,7 @@ struct FollowListPage { @@ -25,6 +27,7 @@ struct FollowListPage {
25 } 27 }
26 28
27 build() { 29 build() {
  30 + Column(){
28 Column() { 31 Column() {
29 //Tab 详情 32 //Tab 详情
30 FollowFirstTabsComponent({changeIndex:Number(this.curIndex)}) 33 FollowFirstTabsComponent({changeIndex:Number(this.curIndex)})
@@ -32,5 +35,8 @@ struct FollowListPage { @@ -32,5 +35,8 @@ struct FollowListPage {
32 .backgroundColor($r('app.color.white')) 35 .backgroundColor($r('app.color.white'))
33 .height('100%') 36 .height('100%')
34 .width('100%') 37 .width('100%')
  38 + }.width("100%")
  39 + .height("100%")
  40 + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
35 } 41 }
36 } 42 }
@@ -19,7 +19,6 @@ const TAG = 'MinePageComponent'; @@ -19,7 +19,6 @@ const TAG = 'MinePageComponent';
19 */ 19 */
20 @Component 20 @Component
21 export struct MinePageComponent { 21 export struct MinePageComponent {
22 - private topRectHeight: string = AppStorage.get<number>('topSafeHeight') + 'px';  
23 //是否是创作者 22 //是否是创作者
24 @State isCreator:boolean = false 23 @State isCreator:boolean = false
25 @State isLogin:boolean = false //默认 false 测试放开 24 @State isLogin:boolean = false //默认 false 测试放开
@@ -63,6 +62,8 @@ export struct MinePageComponent { @@ -63,6 +62,8 @@ export struct MinePageComponent {
63 @StorageProp('currentBreakpoint') @Watch("currentChanged")currentBreakpoint: string = 'sm'; 62 @StorageProp('currentBreakpoint') @Watch("currentChanged")currentBreakpoint: string = 'sm';
64 private breakpointSystem = new BreakpointSystem(); 63 private breakpointSystem = new BreakpointSystem();
65 @State percent:number = 1 64 @State percent:number = 1
  65 + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
  66 + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
66 67
67 currentChanged(){ 68 currentChanged(){
68 if(this.currentBreakpoint == "md" || this.currentBreakpoint == "lg"){ 69 if(this.currentBreakpoint == "md" || this.currentBreakpoint == "lg"){
@@ -154,6 +155,7 @@ export struct MinePageComponent { @@ -154,6 +155,7 @@ export struct MinePageComponent {
154 } 155 }
155 156
156 build() { 157 build() {
  158 + Column(){
157 Scroll(this.scroller){ 159 Scroll(this.scroller){
158 Stack(){ 160 Stack(){
159 Image($r('app.media.mine_head_bg')) 161 Image($r('app.media.mine_head_bg'))
@@ -168,8 +170,10 @@ export struct MinePageComponent { @@ -168,8 +170,10 @@ export struct MinePageComponent {
168 .backgroundColor($r('app.color.color_F9F9F9')) 170 .backgroundColor($r('app.color.color_F9F9F9'))
169 .scrollable(ScrollDirection.Vertical) 171 .scrollable(ScrollDirection.Vertical)
170 .scrollBar(BarState.Off) 172 .scrollBar(BarState.Off)
171 - // 预留状态栏、导航栏高度  
172 - .margin({ top: this.topRectHeight}) 173 +
  174 + }.width("100%")
  175 + .height("100%")
  176 + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
173 } 177 }
174 178
175 179
@@ -132,6 +132,7 @@ struct MyCollectionListPage { @@ -132,6 +132,7 @@ struct MyCollectionListPage {
132 // 加载更多 132 // 加载更多
133 ListItem() { 133 ListItem() {
134 if (this.browSingModel.hasMore === false) NoMoreLayout() 134 if (this.browSingModel.hasMore === false) NoMoreLayout()
  135 + //Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 0, right: 0 });
135 } 136 }
136 } 137 }
137 .scrollBar(BarState.Off) 138 .scrollBar(BarState.Off)
@@ -150,15 +151,18 @@ struct MyCollectionListPage { @@ -150,15 +151,18 @@ struct MyCollectionListPage {
150 } 151 }
151 }) 152 })
152 .margin({left:16}) 153 .margin({left:16})
  154 + Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 });
153 } 155 }
154 Column() { 156 Column() {
155 BigPicCardComponent({compDTO:new CompDTO,contentDTO:compDTO,pageId:TrackConstants.PageName.My_Collect,pageName:TrackConstants.PageName.My_Collect}) 157 BigPicCardComponent({compDTO:new CompDTO,contentDTO:compDTO,pageId:TrackConstants.PageName.My_Collect,pageName:TrackConstants.PageName.My_Collect})
  158 + Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 });
156 } 159 }
157 }.onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => { 160 }.onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => {
158 if (isVisible) { 161 if (isVisible) {
159 TrackingContent.common(TrackConstants.EventType.Show, TrackConstants.PageName.My_Collect,TrackConstants.PageName.My_Collect, TrackParamConvert.program(compDTO)) 162 TrackingContent.common(TrackConstants.EventType.Show, TrackConstants.PageName.My_Collect,TrackConstants.PageName.My_Collect, TrackParamConvert.program(compDTO))
160 } 163 }
161 }) 164 })
  165 +
162 } 166 }
163 167
164 168
@@ -76,7 +76,6 @@ export struct PageComponent { @@ -76,7 +76,6 @@ export struct PageComponent {
76 onActionEnd(this.pageModel, this.pageAdvModel) 76 onActionEnd(this.pageModel, this.pageAdvModel)
77 }) 77 })
78 ) 78 )
79 - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])  
80 79
81 } 80 }
82 81
@@ -47,7 +47,7 @@ struct PeopleShipHomePage { @@ -47,7 +47,7 @@ struct PeopleShipHomePage {
47 } 47 }
48 48
49 onPageHide(): void { 49 onPageHide(): void {
50 - WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', }) 50 + WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000'})
51 } 51 }
52 52
53 topOpacityChange(){ 53 topOpacityChange(){
@@ -70,7 +70,6 @@ struct PeopleShipHomePage { @@ -70,7 +70,6 @@ struct PeopleShipHomePage {
70 .objectRepeat(ImageRepeat.NoRepeat) 70 .objectRepeat(ImageRepeat.NoRepeat)
71 .backgroundColor(Color.White) 71 .backgroundColor(Color.White)
72 .visibility(this.isLoading ? Visibility.None : Visibility.Visible) 72 .visibility(this.isLoading ? Visibility.None : Visibility.Visible)
73 - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])  
74 73
75 Row() 74 Row()
76 .height(px2vp(this.topSafeHeight)) 75 .height(px2vp(this.topSafeHeight))
@@ -78,7 +77,6 @@ struct PeopleShipHomePage { @@ -78,7 +77,6 @@ struct PeopleShipHomePage {
78 .backgroundColor($r('app.color.white')) 77 .backgroundColor($r('app.color.white'))
79 .visibility(this.topOpacity > 0 ? Visibility.Visible : Visibility.None) 78 .visibility(this.topOpacity > 0 ? Visibility.Visible : Visibility.None)
80 .opacity(this.topOpacity ) 79 .opacity(this.topOpacity )
81 - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])  
82 } 80 }
83 81
84 Column(){ 82 Column(){
@@ -141,10 +139,10 @@ struct PeopleShipHomePage { @@ -141,10 +139,10 @@ struct PeopleShipHomePage {
141 }) 139 })
142 } 140 }
143 } 141 }
144 - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])  
145 .alignItems(HorizontalAlign.Start) 142 .alignItems(HorizontalAlign.Start)
146 .justifyContent(FlexAlign.Start) 143 .justifyContent(FlexAlign.Start)
147 .width('100%') 144 .width('100%')
  145 + .margin({top:px2vp(this.topSafeHeight)})
148 } 146 }
149 .width('100%') 147 .width('100%')
150 }else{ 148 }else{
@@ -165,7 +163,6 @@ struct PeopleShipHomePage { @@ -165,7 +163,6 @@ struct PeopleShipHomePage {
165 } 163 }
166 164
167 aboutToAppear() { 165 aboutToAppear() {
168 - WindowModel.shared.setWindowLayoutFullScreen(false)  
169 this.getData() 166 this.getData()
170 } 167 }
171 168
@@ -22,6 +22,8 @@ export struct PrivacySettingPage { @@ -22,6 +22,8 @@ export struct PrivacySettingPage {
22 @StorageProp('currentBreakpoint') @Watch("currentChanged")currentBreakpoint: string = 'sm'; 22 @StorageProp('currentBreakpoint') @Watch("currentChanged")currentBreakpoint: string = 'sm';
23 private breakpointSystem = new BreakpointSystem(); 23 private breakpointSystem = new BreakpointSystem();
24 @State percent:number = 1 24 @State percent:number = 1
  25 + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
  26 + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
25 27
26 currentChanged(){ 28 currentChanged(){
27 if(this.currentBreakpoint == "md" || this.currentBreakpoint == "lg"){ 29 if(this.currentBreakpoint == "md" || this.currentBreakpoint == "lg"){
@@ -76,6 +78,7 @@ export struct PrivacySettingPage { @@ -76,6 +78,7 @@ export struct PrivacySettingPage {
76 78
77 build() { 79 build() {
78 Column(){ 80 Column(){
  81 + Column(){
79 TitleBackComponent({title:"隐私设置"}) 82 TitleBackComponent({title:"隐私设置"})
80 83
81 //滑动区域 84 //滑动区域
@@ -83,6 +86,9 @@ export struct PrivacySettingPage { @@ -83,6 +86,9 @@ export struct PrivacySettingPage {
83 }.backgroundColor('#F8F8F8') 86 }.backgroundColor('#F8F8F8')
84 .width("100%") 87 .width("100%")
85 .height("100%") 88 .height("100%")
  89 + }.width("100%")
  90 + .height("100%")
  91 + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
86 92
87 } 93 }
88 94
@@ -7,6 +7,8 @@ import { AboutPageUI } from '../setting/AboutPageUI'; @@ -7,6 +7,8 @@ import { AboutPageUI } from '../setting/AboutPageUI';
7 struct SettingAboutPage { 7 struct SettingAboutPage {
8 pageShowTime:number = 0; 8 pageShowTime:number = 0;
9 pageHideTime:number = 0; 9 pageHideTime:number = 0;
  10 + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
  11 + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
10 12
11 onPageShow() { 13 onPageShow() {
12 this.pageShowTime = DateTimeUtils.getTimeStamp() 14 this.pageShowTime = DateTimeUtils.getTimeStamp()
@@ -22,7 +24,12 @@ struct SettingAboutPage { @@ -22,7 +24,12 @@ struct SettingAboutPage {
22 24
23 build() { 25 build() {
24 Column(){ 26 Column(){
  27 + Column(){
25 AboutPageUI() 28 AboutPageUI()
26 }.backgroundColor($r('app.color.white')) 29 }.backgroundColor($r('app.color.white'))
  30 + }.width("100%")
  31 + .height("100%")
  32 + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
  33 +
27 } 34 }
28 } 35 }
@@ -16,6 +16,8 @@ struct SettingPage { @@ -16,6 +16,8 @@ struct SettingPage {
16 16
17 pageShowSettingTime:number = 0; 17 pageShowSettingTime:number = 0;
18 pageHideSettingTime:number = 0; 18 pageHideSettingTime:number = 0;
  19 + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
  20 + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
19 21
20 22
21 onPageShow() { 23 onPageShow() {
@@ -44,6 +46,7 @@ struct SettingPage { @@ -44,6 +46,7 @@ struct SettingPage {
44 } 46 }
45 47
46 build() { 48 build() {
  49 + Column(){
47 Column() { 50 Column() {
48 if (this.pageType == 'mainSetting') { 51 if (this.pageType == 'mainSetting') {
49 MineSettingComponent() 52 MineSettingComponent()
@@ -52,6 +55,10 @@ struct SettingPage { @@ -52,6 +55,10 @@ struct SettingPage {
52 } 55 }
53 }.setFullWidth() 56 }.setFullWidth()
54 .backgroundColor($r("app.color.white")) 57 .backgroundColor($r("app.color.white"))
  58 + }.width("100%")
  59 + .height("100%")
  60 + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
  61 +
55 } 62 }
56 63
57 // 私有方法 64 // 私有方法
@@ -167,7 +167,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { @@ -167,7 +167,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
167 Column() { 167 Column() {
168 if (this.moreWidth > this.initMoreWidth + 2) { 168 if (this.moreWidth > this.initMoreWidth + 2) {
169 Text(this.moreTips) 169 Text(this.moreTips)
170 - .fontSize(8) 170 + .fontSize(9)
171 .fontColor(0x858585) 171 .fontColor(0x858585)
172 .width(8) 172 .width(8)
173 } 173 }
@@ -190,7 +190,7 @@ export struct LiveHorizontalCardComponent { @@ -190,7 +190,7 @@ export struct LiveHorizontalCardComponent {
190 Column() { 190 Column() {
191 if (this.moreWidth > this.initMoreWidth + 2) { 191 if (this.moreWidth > this.initMoreWidth + 2) {
192 Text(this.moreTips) 192 Text(this.moreTips)
193 - .fontSize(8) 193 + .fontSize(9)
194 .fontColor(0x858585) 194 .fontColor(0x858585)
195 .width(8) 195 .width(8)
196 } 196 }
1 import router from '@ohos.router' 1 import router from '@ohos.router'
2 -import { DateTimeUtils, NetworkUtil, StringUtils } from 'wdKit'; 2 +import { DateTimeUtils, NetworkUtil, StringUtils, WindowModel } from 'wdKit';
3 import { WDRouterPage, WDRouterRule } from 'wdRouter'; 3 import { WDRouterPage, WDRouterRule } from 'wdRouter';
4 import { editModelParams } from '../model/EditInfoModel'; 4 import { editModelParams } from '../model/EditInfoModel';
5 import { HomePageBottomCommentComponent } from '../components/mine/home/HomePageBottomCommentComponent'; 5 import { HomePageBottomCommentComponent } from '../components/mine/home/HomePageBottomCommentComponent';
@@ -14,7 +14,7 @@ const TAG = "MineHomePage" @@ -14,7 +14,7 @@ const TAG = "MineHomePage"
14 @Entry 14 @Entry
15 @Component 15 @Component
16 struct MineHomePage { 16 struct MineHomePage {
17 - @State tileOpacity: number = 0; 17 + @Watch('topOpacityChange') @State tileOpacity: number = 0;
18 firstPositionY:number = 0; 18 firstPositionY:number = 0;
19 fontColor: string = '#999999' 19 fontColor: string = '#999999'
20 selectedFontColor: string = '#000000' 20 selectedFontColor: string = '#000000'
@@ -38,10 +38,12 @@ struct MineHomePage { @@ -38,10 +38,12 @@ struct MineHomePage {
38 @State isCommentEnter:string = ""; 38 @State isCommentEnter:string = "";
39 @State isConnectNetwork : boolean = NetworkUtil.isNetConnected() 39 @State isConnectNetwork : boolean = NetworkUtil.isNetConnected()
40 @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 40 @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
  41 + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
41 pageShowTime:number = 0; 42 pageShowTime:number = 0;
42 pageHideTime:number = 0; 43 pageHideTime:number = 0;
43 44
44 onPageShow(): void { 45 onPageShow(): void {
  46 + WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff'})
45 this.pageShowTime = DateTimeUtils.getTimeStamp() 47 this.pageShowTime = DateTimeUtils.getTimeStamp()
46 this.getUserInfo() 48 this.getUserInfo()
47 49
@@ -54,7 +56,16 @@ struct MineHomePage { @@ -54,7 +56,16 @@ struct MineHomePage {
54 }, 200); 56 }, 200);
55 } 57 }
56 58
  59 + topOpacityChange(){
  60 + if(this.tileOpacity > 0.8){
  61 + WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000'})
  62 + }else{
  63 + WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff'})
  64 + }
  65 + }
  66 +
57 onPageHide(): void { 67 onPageHide(): void {
  68 + WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000'})
58 this.pageHideTime = DateTimeUtils.getTimeStamp() 69 this.pageHideTime = DateTimeUtils.getTimeStamp()
59 let duration = 0 70 let duration = 0
60 duration = Math.floor((this.pageHideTime - this.pageShowTime)/1000) 71 duration = Math.floor((this.pageHideTime - this.pageShowTime)/1000)
@@ -69,7 +80,6 @@ struct MineHomePage { @@ -69,7 +80,6 @@ struct MineHomePage {
69 .width('100%') 80 .width('100%')
70 .height('355lpx') 81 .height('355lpx')
71 .objectFit(ImageFit.Cover) 82 .objectFit(ImageFit.Cover)
72 - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])  
73 83
74 Row() 84 Row()
75 .height(px2vp(this.topSafeHeight)) 85 .height(px2vp(this.topSafeHeight))
@@ -77,7 +87,6 @@ struct MineHomePage { @@ -77,7 +87,6 @@ struct MineHomePage {
77 .backgroundColor($r('app.color.white')) 87 .backgroundColor($r('app.color.white'))
78 .visibility(this.tileOpacity > 0 ? 0 : 1) 88 .visibility(this.tileOpacity > 0 ? 0 : 1)
79 .opacity(this.tileOpacity ) 89 .opacity(this.tileOpacity )
80 - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])  
81 } 90 }
82 91
83 Column(){ 92 Column(){
@@ -287,8 +296,10 @@ struct MineHomePage { @@ -287,8 +296,10 @@ struct MineHomePage {
287 .scrollBar(BarState.Off) 296 .scrollBar(BarState.Off)
288 .width('100%') 297 .width('100%')
289 .layoutWeight(1) 298 .layoutWeight(1)
290 - }.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) 299 + }
  300 + .margin({top:px2vp(this.topSafeHeight)})
291 }.width('100%') 301 }.width('100%')
  302 + .padding({bottom:px2vp(this.bottomSafeHeight)})
292 .layoutWeight(1) 303 .layoutWeight(1)
293 }else{ 304 }else{
294 Column(){ 305 Column(){
@@ -4,6 +4,8 @@ import TrackingPageBrowseUtils from '../utils/TrackingPageBrowseUtils' @@ -4,6 +4,8 @@ import TrackingPageBrowseUtils from '../utils/TrackingPageBrowseUtils'
4 @Entry 4 @Entry
5 @Component 5 @Component
6 struct MineMessagePage { 6 struct MineMessagePage {
  7 + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
  8 + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
7 9
8 onPageShow(): void { 10 onPageShow(): void {
9 TrackingPageBrowseUtils.TrackingPageBrowseExposureStart() 11 TrackingPageBrowseUtils.TrackingPageBrowseExposureStart()
@@ -15,7 +17,12 @@ struct MineMessagePage { @@ -15,7 +17,12 @@ struct MineMessagePage {
15 17
16 build() { 18 build() {
17 Column(){ 19 Column(){
  20 + Column(){
18 MessageListUI() 21 MessageListUI()
19 } 22 }
  23 + }.width("100%")
  24 + .height("100%")
  25 + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
  26 +
20 } 27 }
21 } 28 }
@@ -70,7 +70,6 @@ struct OtherNormalUserHomePage { @@ -70,7 +70,6 @@ struct OtherNormalUserHomePage {
70 .width('100%') 70 .width('100%')
71 .height('355lpx') 71 .height('355lpx')
72 .objectFit(ImageFit.Cover) 72 .objectFit(ImageFit.Cover)
73 - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])  
74 73
75 Row() 74 Row()
76 .height(px2vp(this.topSafeHeight)) 75 .height(px2vp(this.topSafeHeight))
@@ -78,7 +77,6 @@ struct OtherNormalUserHomePage { @@ -78,7 +77,6 @@ struct OtherNormalUserHomePage {
78 .backgroundColor($r('app.color.white')) 77 .backgroundColor($r('app.color.white'))
79 .visibility(this.tileOpacity > 0 ? 0 : 1) 78 .visibility(this.tileOpacity > 0 ? 0 : 1)
80 .opacity(this.tileOpacity ) 79 .opacity(this.tileOpacity )
81 - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])  
82 } 80 }
83 81
84 Column(){ 82 Column(){
@@ -254,7 +252,7 @@ struct OtherNormalUserHomePage { @@ -254,7 +252,7 @@ struct OtherNormalUserHomePage {
254 .scrollBar(BarState.Off) 252 .scrollBar(BarState.Off)
255 .width('100%') 253 .width('100%')
256 .layoutWeight(1) 254 .layoutWeight(1)
257 - }.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) 255 + }
258 }.width('100%') 256 }.width('100%')
259 .layoutWeight(1) 257 .layoutWeight(1)
260 }else{ 258 }else{
@@ -10,6 +10,8 @@ struct SearchPage { @@ -10,6 +10,8 @@ struct SearchPage {
10 @State fromTabName: string = 'NEWS'; 10 @State fromTabName: string = 'NEWS';
11 pageShowTime:number = 0; 11 pageShowTime:number = 0;
12 pageHideTime:number = 0; 12 pageHideTime:number = 0;
  13 + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
  14 + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
13 15
14 onPageShow() { 16 onPageShow() {
15 this.fromTabName = this.params?.['tabName']; 17 this.fromTabName = this.params?.['tabName'];
@@ -25,9 +27,13 @@ struct SearchPage { @@ -25,9 +27,13 @@ struct SearchPage {
25 27
26 build() { 28 build() {
27 Column(){ 29 Column(){
  30 + Column(){
28 SearchComponent({fromTabName:$fromTabName}) 31 SearchComponent({fromTabName:$fromTabName})
29 }.height('100%') 32 }.height('100%')
30 .width('100%') 33 .width('100%')
31 .backgroundColor($r('app.color.white')) 34 .backgroundColor($r('app.color.white'))
  35 + }.width("100%")
  36 + .height("100%")
  37 + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
32 } 38 }
33 } 39 }
@@ -5,11 +5,19 @@ const TAG = "SubscribeMessagePage" @@ -5,11 +5,19 @@ const TAG = "SubscribeMessagePage"
5 @Entry 5 @Entry
6 @Component 6 @Component
7 struct SubscribeMessagePage { 7 struct SubscribeMessagePage {
  8 + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
  9 + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
  10 +
8 11
9 build() { 12 build() {
10 Column(){ 13 Column(){
  14 + Column(){
11 SubscribeMessageComponent() 15 SubscribeMessageComponent()
12 }.height("100%") 16 }.height("100%")
13 .width("100%") 17 .width("100%")
  18 + }.width("100%")
  19 + .height("100%")
  20 + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
  21 +
14 } 22 }
15 } 23 }
@@ -16,6 +16,7 @@ import { CommentListItem } from '../viewmodel/CommentListItem'; @@ -16,6 +16,7 @@ import { CommentListItem } from '../viewmodel/CommentListItem';
16 struct VisitorCommentPage { 16 struct VisitorCommentPage {
17 @State data: LazyDataSource<CommentListItem> = new LazyDataSource(); 17 @State data: LazyDataSource<CommentListItem> = new LazyDataSource();
18 @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 18 @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
  19 + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
19 @State count: number = 0; 20 @State count: number = 0;
20 @State isLoading: boolean = false 21 @State isLoading: boolean = false
21 @State hasMore: boolean = true 22 @State hasMore: boolean = true
@@ -35,13 +36,14 @@ struct VisitorCommentPage { @@ -35,13 +36,14 @@ struct VisitorCommentPage {
35 } 36 }
36 37
37 build() { 38 build() {
  39 + Column(){
38 Column() { 40 Column() {
39 //标题栏目 41 //标题栏目
40 CustomTitleUI({ titleName: "评论列表" }) 42 CustomTitleUI({ titleName: "评论列表" })
41 if (this.count == 0) { 43 if (this.count == 0) {
42 if (this.isGetRequest == true) { 44 if (this.isGetRequest == true) {
43 if(this.isConnectNetwork){ 45 if(this.isConnectNetwork){
44 - EmptyComponent({ emptyType: 10 }) 46 + EmptyComponent({ emptyType: 11 })
45 .height('100%') 47 .height('100%')
46 .width('100%') 48 .width('100%')
47 }else{ 49 }else{
@@ -68,7 +70,6 @@ struct VisitorCommentPage { @@ -68,7 +70,6 @@ struct VisitorCommentPage {
68 .width("100%") 70 .width("100%")
69 .height("100%") 71 .height("100%")
70 .backgroundColor($r('app.color.white')) 72 .backgroundColor($r('app.color.white'))
71 - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])  
72 CustomPullToRefresh({ 73 CustomPullToRefresh({
73 alldata:this.data, 74 alldata:this.data,
74 scroller:this.scroller, 75 scroller:this.scroller,
@@ -99,6 +100,10 @@ struct VisitorCommentPage { @@ -99,6 +100,10 @@ struct VisitorCommentPage {
99 .backgroundColor($r('app.color.color_transparent')) 100 .backgroundColor($r('app.color.color_transparent'))
100 .height('100%') 101 .height('100%')
101 .width('100%') 102 .width('100%')
  103 + }.width("100%")
  104 + .height("100%")
  105 + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
  106 +
102 } 107 }
103 108
104 @Builder ListLayout(){ 109 @Builder ListLayout(){
@@ -311,8 +311,6 @@ export struct VideoChannelDetail { @@ -311,8 +311,6 @@ export struct VideoChannelDetail {
311 .curve(Curves.initCurve(Curve.EaseIn)) 311 .curve(Curves.initCurve(Curve.EaseIn))
312 .width('100%') 312 .width('100%')
313 .height('100%') 313 .height('100%')
314 - // 扩展至所有非安全区域  
315 - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])  
316 .onChange((index: number) => { 314 .onChange((index: number) => {
317 this.currentIndex = index 315 this.currentIndex = index
318 console.info('onChange==', index.toString()) 316 console.info('onChange==', index.toString())
@@ -72,7 +72,14 @@ struct MultiPictureDetailPage { @@ -72,7 +72,14 @@ struct MultiPictureDetailPage {
72 onPageShow(): void { 72 onPageShow(): void {
73 console.log(TAG, 'onPageShow') 73 console.log(TAG, 'onPageShow')
74 this.pageShowTime = DateTimeUtils.getTimeStamp() 74 this.pageShowTime = DateTimeUtils.getTimeStamp()
75 - 75 + /*// 获取当前应用窗口
  76 + let windowClass: window.Window = window.getLastWindow(this.context)
  77 + // 将状态栏和导航栏的背景色设置为跟应用窗口相同的颜色
  78 + windowClass.setWindowSystemBarProperties({
  79 + navigationBarColor: color,
  80 + statusBarColor: barColor,
  81 + statusBarContentColor: barContentColor,
  82 + })*/
76 } 83 }
77 84
78 onPageHide(): void { 85 onPageHide(): void {
@@ -114,7 +114,7 @@ export struct BottomNavigationComponent { @@ -114,7 +114,7 @@ export struct BottomNavigationComponent {
114 .barMode(BarMode.Fixed) 114 .barMode(BarMode.Fixed)
115 .barBackgroundColor(this.barBackgroundColor) 115 .barBackgroundColor(this.barBackgroundColor)
116 // 备注:鸿蒙目前只有修改三线导航背景方法,对于全面屏导航条手机需要设置背景色并使其扩散到导航区域 116 // 备注:鸿蒙目前只有修改三线导航背景方法,对于全面屏导航条手机需要设置背景色并使其扩散到导航区域
117 - .backgroundColor(this.barBackgroundColor) 117 + // .backgroundColor(this.barBackgroundColor)
118 .layoutWeight(1) 118 .layoutWeight(1)
119 119
120 Blank().width('100%').height(this.bottomRectHeight1).backgroundColor(this.barBackgroundColor) 120 Blank().width('100%').height(this.bottomRectHeight1).backgroundColor(this.barBackgroundColor)
@@ -33,6 +33,7 @@ export struct VideoChannelPage { @@ -33,6 +33,7 @@ export struct VideoChannelPage {
33 // 传递给page的自动刷新通知 33 // 传递给page的自动刷新通知
34 @State autoRefresh2Page: number = 0 34 @State autoRefresh2Page: number = 0
35 @Provide showComment: boolean = false 35 @Provide showComment: boolean = false
  36 + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
36 aboutToAppear(): void { 37 aboutToAppear(): void {
37 this.setBarBackgroundColor() 38 this.setBarBackgroundColor()
38 console.log(TAG, 'aboutToAppear') 39 console.log(TAG, 'aboutToAppear')
@@ -71,7 +72,6 @@ export struct VideoChannelPage { @@ -71,7 +72,6 @@ export struct VideoChannelPage {
71 } 72 }
72 .width('100%') 73 .width('100%')
73 .height('100%') 74 .height('100%')
74 - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])  
75 } 75 }
76 76
77 @Builder 77 @Builder
@@ -151,7 +151,9 @@ export struct VideoChannelPage { @@ -151,7 +151,9 @@ export struct VideoChannelPage {
151 } 151 }
152 .zIndex(20) 152 .zIndex(20)
153 .height($r('app.float.top_tab_bar_height_common')) 153 .height($r('app.float.top_tab_bar_height_common'))
154 - .margin({ top: 10 }) 154 + .margin({
  155 + top: px2vp(this.topSafeHeight)
  156 + })
155 .visibility(this.displayDirection === DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None) 157 .visibility(this.displayDirection === DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None)
156 158
157 } 159 }
@@ -180,7 +182,7 @@ export struct VideoChannelPage { @@ -180,7 +182,7 @@ export struct VideoChannelPage {
180 channelId: item.channelId + '', 182 channelId: item.channelId + '',
181 autoRefresh: this.autoRefresh 183 autoRefresh: this.autoRefresh
182 }) 184 })
183 - .padding({ top: 55 }) 185 + .padding({ top: px2vp(this.topSafeHeight) + 55 })
184 .backgroundColor(Color.White) 186 .backgroundColor(Color.White)
185 } 187 }
186 }, (item: TopNavDTO) => item.channelId + '') 188 }, (item: TopNavDTO) => item.channelId + '')