王士厅
Showing 33 changed files with 497 additions and 388 deletions
@@ -106,10 +106,11 @@ export class ProcessUtils { @@ -106,10 +106,11 @@ export class ProcessUtils {
106 case ContentConstants.TYPE_AUDIO: 106 case ContentConstants.TYPE_AUDIO:
107 ProcessUtils.gotoAudio(content) 107 ProcessUtils.gotoAudio(content)
108 break; 108 break;
109 - case ContentConstants.TYPE_TELETEXT:case ContentConstants.TYPE_Activity: 109 + case ContentConstants.TYPE_TELETEXT:
  110 + case ContentConstants.TYPE_Activity:
110 // 图文详情,跳转h5 111 // 图文详情,跳转h5
111 if (content?.linkUrl) { //有 linkUrl 走专题页展示逻辑 112 if (content?.linkUrl) { //有 linkUrl 走专题页展示逻辑
112 - ProcessUtils.gotoSpecialTopic(content,true) 113 + ProcessUtils.gotoSpecialTopic(content, true)
113 } else { 114 } else {
114 ProcessUtils.gotoWeb(content); 115 ProcessUtils.gotoWeb(content);
115 } 116 }
@@ -171,17 +172,17 @@ export class ProcessUtils { @@ -171,17 +172,17 @@ export class ProcessUtils {
171 let relIndex = 0; 172 let relIndex = 0;
172 for (let index = 0; index < photoList.length; index++) { 173 for (let index = 0; index < photoList.length; index++) {
173 const element = photoList[index]; 174 const element = photoList[index];
174 - if(!StringUtils.isEmpty(element.picPath)){  
175 - relIndex = relIndex+1 175 + if (!StringUtils.isEmpty(element.picPath)) {
  176 + relIndex = relIndex + 1
176 } 177 }
177 } 178 }
178 tempP.length = relIndex 179 tempP.length = relIndex
179 relIndex = 0 180 relIndex = 0
180 for (let index = 0; index < photoList.length; index++) { 181 for (let index = 0; index < photoList.length; index++) {
181 const element = photoList[index]; 182 const element = photoList[index];
182 - if(!StringUtils.isEmpty(element.picPath)){ 183 + if (!StringUtils.isEmpty(element.picPath)) {
183 tempP[relIndex] = element 184 tempP[relIndex] = element
184 - relIndex = relIndex+1 185 + relIndex = relIndex + 1
185 } 186 }
186 } 187 }
187 photoList.length = tempP.length 188 photoList.length = tempP.length
@@ -243,7 +244,7 @@ export class ProcessUtils { @@ -243,7 +244,7 @@ export class ProcessUtils {
243 public static gotoDefaultWeb(content: ContentDTO) { 244 public static gotoDefaultWeb(content: ContentDTO) {
244 245
245 // 内链 246 // 内链
246 - if(content.openType == '1'){ 247 + if (content.openType == '1') {
247 let taskAction: Action = { 248 let taskAction: Action = {
248 type: 'JUMP_H5_BY_WEB_VIEW', 249 type: 'JUMP_H5_BY_WEB_VIEW',
249 params: { 250 params: {
@@ -251,10 +252,10 @@ export class ProcessUtils { @@ -251,10 +252,10 @@ export class ProcessUtils {
251 } as Params, 252 } as Params,
252 }; 253 };
253 WDRouterRule.jumpWithAction(taskAction) 254 WDRouterRule.jumpWithAction(taskAction)
254 - }else if(content.openType == '2') { 255 + } else if (content.openType == '2') {
255 // 外链 256 // 外链
256 ProcessUtils.jumpExternalWebPage(content.linkUrl); 257 ProcessUtils.jumpExternalWebPage(content.linkUrl);
257 - }else { 258 + } else {
258 // 无需跳转 259 // 无需跳转
259 260
260 } 261 }
@@ -476,9 +477,14 @@ export class ProcessUtils { @@ -476,9 +477,14 @@ export class ProcessUtils {
476 477
477 /** 478 /**
478 * 跳转人民号主页 479 * 跳转人民号主页
479 - * @params creatorId 创作者id 480 + * @param creatorId 创作者id
  481 + * @param banControl 是否封禁可以查看号主页 0 可以,1不可以
  482 + * @param mainControl 中文端账号是否拥有主页展示权限:0-未拥有,1-拥有
  483 + * @param userId 用户id
  484 + * @param userType 用户类型 1: 普通用户,2: 创作者 3: 矩阵号 4:运营子账号 5:内容源账号
480 */ 485 */
481 - public static gotoPeopleShipHomePage(creatorId: string) { 486 + public static gotoPeopleShipHomePage(creatorId: string, banControl?: number, mainControl?: number, userId?: string,
  487 + userType?: string) {
482 let params = { 'creatorId': creatorId } as Record<string, string>; 488 let params = { 'creatorId': creatorId } as Record<string, string>;
483 WDRouterRule.jumpWithPage(WDRouterPage.peopleShipHomePage, params) 489 WDRouterRule.jumpWithPage(WDRouterPage.peopleShipHomePage, params)
484 } 490 }
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) {
@@ -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')
@@ -9,7 +9,7 @@ import { RmhInfoDTO, CompDTO, ContentDTO } from 'wdBean' @@ -9,7 +9,7 @@ import { RmhInfoDTO, CompDTO, ContentDTO } from 'wdBean'
9 import { CommonConstants } from 'wdConstant/Index'; 9 import { CommonConstants } from 'wdConstant/Index';
10 import { DateTimeUtils, SPHelper, Logger, ToastUtils } from 'wdKit'; 10 import { DateTimeUtils, SPHelper, Logger, ToastUtils } from 'wdKit';
11 import { SpConstants } from 'wdConstant/Index' 11 import { SpConstants } from 'wdConstant/Index'
12 -import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; 12 +import { ProcessUtils, WDRouterPage, WDRouterRule } from 'wdRouter/Index';
13 import router from '@ohos.router' 13 import router from '@ohos.router'
14 import { postBatchAttentionStatusParams } from 'wdBean/Index'; 14 import { postBatchAttentionStatusParams } from 'wdBean/Index';
15 import { MultiPictureDetailViewModel } from '../../viewmodel/MultiPictureDetailViewModel' 15 import { MultiPictureDetailViewModel } from '../../viewmodel/MultiPictureDetailViewModel'
@@ -180,5 +180,11 @@ export struct RmhTitle { @@ -180,5 +180,11 @@ export struct RmhTitle {
180 } 180 }
181 .width(CommonConstants.FULL_WIDTH) 181 .width(CommonConstants.FULL_WIDTH)
182 .margin({ bottom: 10 }) 182 .margin({ bottom: 10 })
  183 + .onClick(()=>{
  184 +
  185 + // 跳转号主
  186 + ProcessUtils.gotoPeopleShipHomePage( this.rmhInfo?.rmhId,this.rmhInfo?.banControl,this.rmhInfo?.cnMainControl,this.rmhInfo?.userId,this.rmhInfo?.userType)
  187 +
  188 + })
183 } 189 }
184 } 190 }
@@ -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'))
@@ -74,6 +74,10 @@ export struct ZhSingleRow02 { @@ -74,6 +74,10 @@ export struct ZhSingleRow02 {
74 } 74 }
75 } 75 }
76 76
  77 + showMore() {
  78 + return !!this.compDTO.dataSourceType || !(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')
  79 + }
  80 +
77 build() { 81 build() {
78 Column() { 82 Column() {
79 //顶部 83 //顶部
@@ -93,7 +97,7 @@ export struct ZhSingleRow02 { @@ -93,7 +97,7 @@ export struct ZhSingleRow02 {
93 .margin({ right: 8 }) 97 .margin({ right: 8 })
94 }) 98 })
95 } 99 }
96 - if (this.compDTO.operDataList.length >= 2 && !(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')) { 100 + if (this.compDTO.operDataList.length >= 2 && this.showMore()) {
97 Row() { 101 Row() {
98 Ellipse() 102 Ellipse()
99 .width(2* (this.moreWidth - this.initMoreWidth - 1)) 103 .width(2* (this.moreWidth - this.initMoreWidth - 1))
@@ -104,7 +108,7 @@ export struct ZhSingleRow02 { @@ -104,7 +108,7 @@ export struct ZhSingleRow02 {
104 Column() { 108 Column() {
105 if (this.moreWidth > this.initMoreWidth + 2) { 109 if (this.moreWidth > this.initMoreWidth + 2) {
106 Text(this.moreTips) 110 Text(this.moreTips)
107 - .fontSize(8) 111 + .fontSize(9)
108 .fontColor(0x858585) 112 .fontColor(0x858585)
109 .width(8) 113 .width(8)
110 } 114 }
@@ -182,7 +186,7 @@ export struct ZhSingleRow02 { @@ -182,7 +186,7 @@ export struct ZhSingleRow02 {
182 .padding({ 186 .padding({
183 right: $r('app.float.card_comp_pagePadding_lf'), 187 right: $r('app.float.card_comp_pagePadding_lf'),
184 }) 188 })
185 - .visibility(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '' ? Visibility.None : Visibility.Visible) 189 + .visibility(this.showMore() ? Visibility.Visible : Visibility.None)
186 .onClick(() => { 190 .onClick(() => {
187 if (this.compDTO?.objectType === '11') { 191 if (this.compDTO?.objectType === '11') {
188 ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle) 192 ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle)
@@ -150,7 +150,10 @@ export struct ZhSingleRow03 { @@ -150,7 +150,10 @@ export struct ZhSingleRow03 {
150 return str.slice(0) 150 return str.slice(0)
151 } 151 }
152 } 152 }
  153 + }
153 154
  155 + showMore() {
  156 + return !!this.compDTO.dataSourceType || !(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')
154 } 157 }
155 158
156 build() { 159 build() {
@@ -165,7 +168,7 @@ export struct ZhSingleRow03 { @@ -165,7 +168,7 @@ export struct ZhSingleRow03 {
165 this.ItemCard(item) 168 this.ItemCard(item)
166 }) 169 })
167 } 170 }
168 - if (this.compDTO.operDataList.length >= 2 && !(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')) { 171 + if (this.compDTO.operDataList.length >= 2 && this.showMore()) {
169 Row() { 172 Row() {
170 Ellipse() 173 Ellipse()
171 .width(2* (this.moreWidth - this.initMoreWidth - 1)) 174 .width(2* (this.moreWidth - this.initMoreWidth - 1))
@@ -176,7 +179,7 @@ export struct ZhSingleRow03 { @@ -176,7 +179,7 @@ export struct ZhSingleRow03 {
176 Column() { 179 Column() {
177 if (this.moreWidth > this.initMoreWidth + 2) { 180 if (this.moreWidth > this.initMoreWidth + 2) {
178 Text(this.moreTips) 181 Text(this.moreTips)
179 - .fontSize(8) 182 + .fontSize(9)
180 .fontColor(0x858585) 183 .fontColor(0x858585)
181 .width(8) 184 .width(8)
182 } 185 }
@@ -401,7 +404,7 @@ export struct ZhSingleRow03 { @@ -401,7 +404,7 @@ export struct ZhSingleRow03 {
401 .fontWeight(600) 404 .fontWeight(600)
402 } 405 }
403 406
404 - if (!(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')) { 407 + if (this.showMore()) {
405 Row() { 408 Row() {
406 Text("更多") 409 Text("更多")
407 .fontSize($r("app.float.font_size_14")) 410 .fontSize($r("app.float.font_size_14"))
@@ -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,33 +57,40 @@ export struct SubscribeMessageComponent{ @@ -57,33 +57,40 @@ export struct SubscribeMessageComponent{
57 } 57 }
58 } 58 }
59 } else { 59 } else {
60 - CustomPullToRefresh({  
61 - alldata:this.data,  
62 - scroller:this.scroller,  
63 - customList:()=>{  
64 - this.ListLayout()  
65 - },  
66 - onRefresh:(resolve)=>{  
67 - this.curPageNum = 1;  
68 - this.hasMore = true  
69 - this.isGetRequest = false  
70 - this.data.clear()  
71 - if (!this.isLoading) {  
72 - this.getNewPageData()  
73 - }  
74 - if(resolve) resolve('刷新成功')  
75 - },  
76 - onLoadMore:(resolve)=> {  
77 - if (!this.isLoading) {  
78 - //加载分页数据  
79 - this.getNewPageData() 60 + Stack(){
  61 + Row()
  62 + .width("100%")
  63 + .height("100%")
  64 + .backgroundColor($r('app.color.color_F9F9F9'))
  65 +
  66 + CustomPullToRefresh({
  67 + alldata:this.data,
  68 + scroller:this.scroller,
  69 + customList:()=>{
  70 + this.ListLayout()
  71 + },
  72 + onRefresh:(resolve)=>{
  73 + this.curPageNum = 1;
  74 + this.hasMore = true
  75 + this.isGetRequest = false
  76 + this.data.clear()
  77 + if (!this.isLoading) {
  78 + this.getNewPageData()
  79 + }
  80 + if(resolve) resolve('刷新成功')
  81 + },
  82 + onLoadMore:(resolve)=> {
  83 + if (!this.isLoading) {
  84 + //加载分页数据
  85 + this.getNewPageData()
  86 + }
80 } 87 }
81 - }  
82 - })  
83 - .width('100%') 88 + })
  89 + .width('100%')
  90 + }
84 } 91 }
85 } 92 }
86 - .backgroundColor($r('app.color.color_F9F9F9')) 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(){
26 - AppointmentListUI()  
27 - } 29 + Column(){
  30 + AppointmentListUI()
  31 + }
  32 + }.width("100%")
  33 + .height("100%")
  34 + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
  35 +
28 } 36 }
29 } 37 }
@@ -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,12 +27,16 @@ struct FollowListPage { @@ -25,12 +27,16 @@ struct FollowListPage {
25 } 27 }
26 28
27 build() { 29 build() {
28 - Column() {  
29 - //Tab 详情  
30 - FollowFirstTabsComponent({changeIndex:Number(this.curIndex)})  
31 - }  
32 - .backgroundColor($r('app.color.white'))  
33 - .height('100%')  
34 - .width('100%') 30 + Column(){
  31 + Column() {
  32 + //Tab 详情
  33 + FollowFirstTabsComponent({changeIndex:Number(this.curIndex)})
  34 + }
  35 + .backgroundColor($r('app.color.white'))
  36 + .height('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,22 +155,25 @@ export struct MinePageComponent { @@ -154,22 +155,25 @@ export struct MinePageComponent {
154 } 155 }
155 156
156 build() { 157 build() {
157 - Scroll(this.scroller){  
158 - Stack(){  
159 - Image($r('app.media.mine_head_bg'))  
160 - .width('100%')  
161 - .height(`${657 * this.percent}lpx`)  
162 - .objectFit(ImageFit.Auto)  
163 - this.MinePageUI() 158 + Column(){
  159 + Scroll(this.scroller){
  160 + Stack(){
  161 + Image($r('app.media.mine_head_bg'))
  162 + .width('100%')
  163 + .height(`${657 * this.percent}lpx`)
  164 + .objectFit(ImageFit.Auto)
  165 + this.MinePageUI()
  166 + }
  167 + .alignContent(Alignment.Top)
164 } 168 }
165 - .alignContent(Alignment.Top)  
166 - }  
167 - .setFullWidthAndHeight()  
168 - .backgroundColor($r('app.color.color_F9F9F9'))  
169 - .scrollable(ScrollDirection.Vertical)  
170 - .scrollBar(BarState.Off)  
171 - // 预留状态栏、导航栏高度  
172 - .margin({ top: this.topRectHeight}) 169 + .setFullWidthAndHeight()
  170 + .backgroundColor($r('app.color.color_F9F9F9'))
  171 + .scrollable(ScrollDirection.Vertical)
  172 + .scrollBar(BarState.Off)
  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
@@ -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,13 +78,17 @@ export struct PrivacySettingPage { @@ -76,13 +78,17 @@ export struct PrivacySettingPage {
76 78
77 build() { 79 build() {
78 Column(){ 80 Column(){
79 - TitleBackComponent({title:"隐私设置"})  
80 -  
81 - //滑动区域  
82 - this.PrivacySettingComponentsUI()  
83 - }.backgroundColor('#F8F8F8')  
84 - .width("100%") 81 + Column(){
  82 + TitleBackComponent({title:"隐私设置"})
  83 +
  84 + //滑动区域
  85 + this.PrivacySettingComponentsUI()
  86 + }.backgroundColor('#F8F8F8')
  87 + .width("100%")
  88 + .height("100%")
  89 + }.width("100%")
85 .height("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(){
25 - AboutPageUI()  
26 - }.backgroundColor($r('app.color.white')) 27 + Column(){
  28 + AboutPageUI()
  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,14 +46,19 @@ struct SettingPage { @@ -44,14 +46,19 @@ struct SettingPage {
44 } 46 }
45 47
46 build() { 48 build() {
47 - Column() {  
48 - if (this.pageType == 'mainSetting') {  
49 - MineSettingComponent()  
50 - } else {  
51 - AccountAndSecurityLayout({enterActivityTime:this.enterActivityTime})  
52 - }  
53 - }.setFullWidth()  
54 - .backgroundColor($r("app.color.white")) 49 + Column(){
  50 + Column() {
  51 + if (this.pageType == 'mainSetting') {
  52 + MineSettingComponent()
  53 + } else {
  54 + AccountAndSecurityLayout({enterActivityTime:this.enterActivityTime})
  55 + }
  56 + }.setFullWidth()
  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)
@@ -62,248 +73,248 @@ struct MineHomePage { @@ -62,248 +73,248 @@ struct MineHomePage {
62 } 73 }
63 74
64 build() { 75 build() {
65 - if(this.isConnectNetwork){  
66 - Stack({ alignContent: Alignment.Top }){ 76 + if(this.isConnectNetwork){
67 Stack({ alignContent: Alignment.Top }){ 77 Stack({ alignContent: Alignment.Top }){
68 - Image($r('app.media.title_bg'))  
69 - .width('100%')  
70 - .height('355lpx')  
71 - .objectFit(ImageFit.Cover)  
72 - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])  
73 -  
74 - Row()  
75 - .height(px2vp(this.topSafeHeight))  
76 - .width("100%")  
77 - .backgroundColor($r('app.color.white'))  
78 - .visibility(this.tileOpacity > 0 ? 0 : 1)  
79 - .opacity(this.tileOpacity )  
80 - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])  
81 - }  
82 -  
83 - Column(){  
84 Stack({ alignContent: Alignment.Top }){ 78 Stack({ alignContent: Alignment.Top }){
85 - this.MineHomeTitleTransparent()  
86 - this.MineHomeTitleWhite() 79 + Image($r('app.media.title_bg'))
  80 + .width('100%')
  81 + .height('355lpx')
  82 + .objectFit(ImageFit.Cover)
  83 +
  84 + Row()
  85 + .height(px2vp(this.topSafeHeight))
  86 + .width("100%")
  87 + .backgroundColor($r('app.color.white'))
  88 + .visibility(this.tileOpacity > 0 ? 0 : 1)
  89 + .opacity(this.tileOpacity )
87 } 90 }
88 91
89 - Scroll(this.scroller) {  
90 - Column() {  
91 - //用户信息区域  
92 - Row() {  
93 - Stack(){  
94 - Image(this.headPhotoUrl)  
95 - .alt($r('app.media.default_head'))  
96 - .width('115lpx')  
97 - .height('115lpx')  
98 - .objectFit(ImageFit.Auto)  
99 - .clip(new Circle({ width: '115lpx', height: '115lpx' }))  
100 - Image(this.levelHead)  
101 - .width('165lpx')  
102 - .height('165lpx')  
103 - .objectFit(ImageFit.Auto)  
104 - }.onClick(()=>{  
105 - let params = {'headPhotoUrl': this.headPhotoUrl} as Record<string, string>;  
106 - WDRouterRule.jumpWithPage(WDRouterPage.showUserHeaderPage,params)  
107 - }).width('165lpx')  
108 - .height('165lpx') 92 + Column(){
  93 + Stack({ alignContent: Alignment.Top }){
  94 + this.MineHomeTitleTransparent()
  95 + this.MineHomeTitleWhite()
  96 + }
  97 +
  98 + Scroll(this.scroller) {
  99 + Column() {
  100 + //用户信息区域
  101 + Row() {
  102 + Stack(){
  103 + Image(this.headPhotoUrl)
  104 + .alt($r('app.media.default_head'))
  105 + .width('115lpx')
  106 + .height('115lpx')
  107 + .objectFit(ImageFit.Auto)
  108 + .clip(new Circle({ width: '115lpx', height: '115lpx' }))
  109 + Image(this.levelHead)
  110 + .width('165lpx')
  111 + .height('165lpx')
  112 + .objectFit(ImageFit.Auto)
  113 + }.onClick(()=>{
  114 + let params = {'headPhotoUrl': this.headPhotoUrl} as Record<string, string>;
  115 + WDRouterRule.jumpWithPage(WDRouterPage.showUserHeaderPage,params)
  116 + }).width('165lpx')
  117 + .height('165lpx')
  118 +
  119 + Column() {
  120 + Row() {
  121 + Text(`${this.userName}`)
  122 + .fontColor($r('app.color.white'))
  123 + .maxLines(1)
  124 + .textOverflow({ overflow: TextOverflow.Ellipsis })
  125 + .fontSize('38lpx')
  126 + .lineHeight('50lpx')
  127 + .fontWeight('500lpx')
  128 + .onClick(()=>{
  129 + let params: editModelParams = {
  130 + editContent: this.userName
  131 + }
  132 + WDRouterRule.jumpWithPage(WDRouterPage.editUserNikeNamePage,params)
  133 + })
  134 +
  135 + if(this.levelId>0){
  136 + Text(`等级${this.levelId}`)
  137 + .fontColor($r('app.color.color_ED2800'))
  138 + .fontSize('23lpx')
  139 + .fontWeight(500)
  140 + .margin({ left: '10lpx' })
  141 + .backgroundImage($r("app.media.my_grade_bg"))
  142 + .backgroundImageSize(ImageSize.Cover)
  143 + .padding({left:"17lpx",right:"8lpx"})
  144 + .height('35lpx')
  145 + .borderRadius({topRight:2,bottomRight:2})
  146 + }
  147 +
  148 + Blank()
  149 + }.width('507lpx')
109 150
  151 + Row() {
  152 + Row() {
  153 + Text(`${this.browseNum}`)
  154 + .textStyle()
  155 + Text("阅读")
  156 + .textStyle2()
  157 + }
  158 + .margin({ right: '15lpx' })
  159 +
  160 + Divider()
  161 + .height('19lpx')
  162 + .width('2lpx')
  163 + .color($r('app.color.white'))
  164 + .vertical(true)
  165 + .opacity(0.4)
  166 + Row() {
  167 + Text(`${this.commentNum}`)
  168 + .textStyle()
  169 + Text("评论")
  170 + .textStyle2()
  171 + }.margin({ right: '15lpx', left: '15lpx' })
  172 +
  173 + Divider()
  174 + .height('19lpx')
  175 + .width('2lpx')
  176 + .color($r('app.color.white'))
  177 + .vertical(true)
  178 + .opacity(0.4)
  179 + Row() {
  180 + Text(`${this.attentionNum}`)
  181 + .textStyle()
  182 + Text("关注")
  183 + .textStyle2()
  184 + }.margin({ left: '15lpx' })
  185 + }.margin({ top: '23lpx' })
  186 + }.alignItems(HorizontalAlign.Start)
  187 + .margin({ left: StringUtils.isEmpty(this.levelHead)?'32lpx':"3lpx" })
  188 + }
  189 + .onAreaChange((oldValue: Area, newValue: Area) => {
  190 + if (this.firstPositionY === 0) {
  191 + this.firstPositionY = newValue.globalPosition.y as number
  192 + }else{
  193 + let persent = (this.firstPositionY - Number(newValue.globalPosition.y)) / (this.firstPositionY * 0.3)
  194 + if(persent > 1){
  195 + persent = 1
  196 + }
  197 + this.tileOpacity = persent
  198 + }
  199 + })
  200 + .backgroundColor($r('app.color.color_transparent'))
  201 + .height('184lpx')
  202 + .width('100%')
  203 + .padding({ left: '6lpx' })
  204 +
  205 +
  206 + //用户简介区域
110 Column() { 207 Column() {
111 Row() { 208 Row() {
112 - Text(`${this.userName}`)  
113 - .fontColor($r('app.color.white'))  
114 - .maxLines(1) 209 + Text(this.isHasIntroduction?"简介:"+this.desc:this.desc)
  210 + .fontSize('27lpx')
  211 + .maxLines(3)
115 .textOverflow({ overflow: TextOverflow.Ellipsis }) 212 .textOverflow({ overflow: TextOverflow.Ellipsis })
116 - .fontSize('38lpx')  
117 - .lineHeight('50lpx')  
118 - .fontWeight('500lpx') 213 + .lineHeight('40lpx')
  214 + .fontWeight('400lpx')
  215 + .fontColor(this.isHasIntroduction?$r('app.color.color_222222'):$r('app.color.color_999999'))
  216 + .textAlign(TextAlign.Start)
119 .onClick(()=>{ 217 .onClick(()=>{
120 let params: editModelParams = { 218 let params: editModelParams = {
121 - editContent: this.userName 219 + editContent: this.isHasIntroduction?this.desc:''
122 } 220 }
123 - WDRouterRule.jumpWithPage(WDRouterPage.editUserNikeNamePage,params) 221 + WDRouterRule.jumpWithPage(WDRouterPage.editUserIntroductionPage,params)
124 }) 222 })
125 -  
126 - if(this.levelId>0){  
127 - Text(`等级${this.levelId}`)  
128 - .fontColor($r('app.color.color_ED2800'))  
129 - .fontSize('23lpx')  
130 - .fontWeight(500)  
131 - .margin({ left: '10lpx' })  
132 - .backgroundImage($r("app.media.my_grade_bg"))  
133 - .backgroundImageSize(ImageSize.Cover)  
134 - .padding({left:"17lpx",right:"8lpx"})  
135 - .height('35lpx')  
136 - .borderRadius({topRight:2,bottomRight:2})  
137 - }  
138 -  
139 - Blank()  
140 - }.width('507lpx')  
141 -  
142 - Row() {  
143 - Row() {  
144 - Text(`${this.browseNum}`)  
145 - .textStyle()  
146 - Text("阅读")  
147 - .textStyle2() 223 + if(!this.isHasIntroduction){
  224 + Image($r('app.media.user_info_edit_icon'))
  225 + .width('27lpx')
  226 + .height('27lpx')
  227 + .interpolation(ImageInterpolation.High)
  228 + .objectFit(ImageFit.Auto)
148 } 229 }
149 - .margin({ right: '15lpx' })  
150 -  
151 - Divider()  
152 - .height('19lpx')  
153 - .width('2lpx')  
154 - .color($r('app.color.white'))  
155 - .vertical(true)  
156 - .opacity(0.4)  
157 - Row() {  
158 - Text(`${this.commentNum}`)  
159 - .textStyle()  
160 - Text("评论")  
161 - .textStyle2()  
162 - }.margin({ right: '15lpx', left: '15lpx' })  
163 -  
164 - Divider()  
165 - .height('19lpx')  
166 - .width('2lpx')  
167 - .color($r('app.color.white'))  
168 - .vertical(true)  
169 - .opacity(0.4)  
170 - Row() {  
171 - Text(`${this.attentionNum}`)  
172 - .textStyle()  
173 - Text("关注")  
174 - .textStyle2()  
175 - }.margin({ left: '15lpx' })  
176 - }.margin({ top: '23lpx' })  
177 - }.alignItems(HorizontalAlign.Start)  
178 - .margin({ left: StringUtils.isEmpty(this.levelHead)?'32lpx':"3lpx" })  
179 - }  
180 - .onAreaChange((oldValue: Area, newValue: Area) => {  
181 - if (this.firstPositionY === 0) {  
182 - this.firstPositionY = newValue.globalPosition.y as number  
183 - }else{  
184 - let persent = (this.firstPositionY - Number(newValue.globalPosition.y)) / (this.firstPositionY * 0.3)  
185 - if(persent > 1){  
186 - persent = 1  
187 } 230 }
188 - this.tileOpacity = persent  
189 - }  
190 - })  
191 - .backgroundColor($r('app.color.color_transparent'))  
192 - .height('184lpx')  
193 - .width('100%')  
194 - .padding({ left: '6lpx' })  
195 231
196 232
197 - //用户简介区域  
198 - Column() {  
199 - Row() {  
200 - Text(this.isHasIntroduction?"简介:"+this.desc:this.desc)  
201 - .fontSize('27lpx')  
202 - .maxLines(3)  
203 - .textOverflow({ overflow: TextOverflow.Ellipsis })  
204 - .lineHeight('40lpx') 233 + Text(`来到人民日报${this.registerTimeForDay}天`)
  234 + .fontSize('23lpx')
  235 + .lineHeight('25lpx')
205 .fontWeight('400lpx') 236 .fontWeight('400lpx')
206 - .fontColor(this.isHasIntroduction?$r('app.color.color_222222'):$r('app.color.color_999999')) 237 + .fontColor($r('app.color.color_999999'))
207 .textAlign(TextAlign.Start) 238 .textAlign(TextAlign.Start)
208 - .onClick(()=>{  
209 - let params: editModelParams = {  
210 - editContent: this.isHasIntroduction?this.desc:''  
211 - }  
212 - WDRouterRule.jumpWithPage(WDRouterPage.editUserIntroductionPage,params)  
213 - })  
214 - if(!this.isHasIntroduction){  
215 - Image($r('app.media.user_info_edit_icon'))  
216 - .width('27lpx')  
217 - .height('27lpx')  
218 - .interpolation(ImageInterpolation.High)  
219 - .objectFit(ImageFit.Auto)  
220 - }  
221 - } 239 + .margin({ top: '15lpx' })
222 240
  241 + }.padding({ left: '31lpx',right:'31lpx',top:'19lpx',bottom:'31lpx'})
  242 + .alignItems(HorizontalAlign.Start)
  243 + .justifyContent(FlexAlign.Center)
  244 + .width('100%')
  245 + .backgroundColor($r('app.color.white'))
  246 + //间隔符
223 247
224 - Text(`来到人民日报${this.registerTimeForDay}天`)  
225 - .fontSize('23lpx')  
226 - .lineHeight('25lpx')  
227 - .fontWeight('400lpx')  
228 - .fontColor($r('app.color.color_999999'))  
229 - .textAlign(TextAlign.Start)  
230 - .margin({ top: '15lpx' })  
231 -  
232 - }.padding({ left: '31lpx',right:'31lpx',top:'19lpx',bottom:'31lpx'})  
233 - .alignItems(HorizontalAlign.Start)  
234 - .justifyContent(FlexAlign.Center)  
235 - .width('100%')  
236 - .backgroundColor($r('app.color.white'))  
237 - //间隔符  
238 -  
239 - Divider().width('100%').height('12lpx').color($r('app.color.color_F5F5F5')).strokeWidth('12lpx') 248 + Divider().width('100%').height('12lpx').color($r('app.color.color_F5F5F5')).strokeWidth('12lpx')
240 249
241 - //tab 页面  
242 - Stack({ alignContent: Alignment.Top }){  
243 - Tabs({controller: this.controller}) {  
244 - TabContent() {  
245 - HomePageBottomCommentComponent({commentNum:$commentNum})  
246 - }  
247 - TabContent() {  
248 - HomePageBottomFollowComponent() 250 + //tab 页面
  251 + Stack({ alignContent: Alignment.Top }){
  252 + Tabs({controller: this.controller}) {
  253 + TabContent() {
  254 + HomePageBottomCommentComponent({commentNum:$commentNum})
  255 + }
  256 + TabContent() {
  257 + HomePageBottomFollowComponent()
  258 + }
249 } 259 }
250 - }  
251 - .backgroundColor($r('app.color.white'))  
252 - .animationDuration(0)  
253 - .onChange((index: number) => {  
254 - this.currentIndex = index  
255 - trackTabFirstClick(index === 0 ? "评论":"关注")  
256 - })  
257 - .vertical(false)  
258 - .barHeight("77lpx")  
259 -  
260 - Column() {  
261 - // 页签  
262 - Row({ space: 7 }) {  
263 - Scroll() {  
264 - Row() {  
265 - this.TabBuilder(0,"评论")  
266 - this.TabBuilder(1,"关注") 260 + .backgroundColor($r('app.color.white'))
  261 + .animationDuration(0)
  262 + .onChange((index: number) => {
  263 + this.currentIndex = index
  264 + trackTabFirstClick(index === 0 ? "评论":"关注")
  265 + })
  266 + .vertical(false)
  267 + .barHeight("77lpx")
  268 +
  269 + Column() {
  270 + // 页签
  271 + Row({ space: 7 }) {
  272 + Scroll() {
  273 + Row() {
  274 + this.TabBuilder(0,"评论")
  275 + this.TabBuilder(1,"关注")
  276 + }
  277 + .justifyContent(FlexAlign.Start)
267 } 278 }
268 - .justifyContent(FlexAlign.Start) 279 + .align(Alignment.Start)
  280 + .scrollable(ScrollDirection.Horizontal)
  281 + .scrollBar(BarState.Off)
  282 + .width('100%')
  283 + .padding({left:'31lpx'})
269 } 284 }
270 - .align(Alignment.Start)  
271 - .scrollable(ScrollDirection.Horizontal)  
272 - .scrollBar(BarState.Off) 285 + .alignItems(VerticalAlign.Bottom)
273 .width('100%') 286 .width('100%')
274 - .padding({left:'31lpx'})  
275 } 287 }
276 - .alignItems(VerticalAlign.Bottom) 288 + .backgroundColor($r('app.color.white'))
  289 + .alignItems(HorizontalAlign.Start)
277 .width('100%') 290 .width('100%')
  291 + .height('77lpx')
278 } 292 }
279 - .backgroundColor($r('app.color.white'))  
280 - .alignItems(HorizontalAlign.Start)  
281 - .width('100%')  
282 - .height('77lpx')  
283 - }  
284 - }.width("100%")  
285 - }  
286 - .edgeEffect(EdgeEffect.None)  
287 - .scrollBar(BarState.Off)  
288 - .width('100%')  
289 - .layoutWeight(1)  
290 - }.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])  
291 - }.width('100%')  
292 - .layoutWeight(1)  
293 - }else{  
294 - Column(){  
295 - CustomTitleUI({ titleName: "" })  
296 -  
297 - EmptyComponent({ emptyType: 1,emptyHeight:"100%" ,retry: () => {  
298 - this.isConnectNetwork = NetworkUtil.isNetConnected()  
299 - if(this.isConnectNetwork){  
300 - this.getUserInfo() 293 + }.width("100%")
  294 + }
  295 + .edgeEffect(EdgeEffect.None)
  296 + .scrollBar(BarState.Off)
  297 + .width('100%')
  298 + .layoutWeight(1)
301 } 299 }
302 - },})  
303 - .layoutWeight(1)  
304 - .width('100%') 300 + .margin({top:px2vp(this.topSafeHeight)})
  301 + }.width('100%')
  302 + .padding({bottom:px2vp(this.bottomSafeHeight)})
  303 + .layoutWeight(1)
  304 + }else{
  305 + Column(){
  306 + CustomTitleUI({ titleName: "" })
  307 +
  308 + EmptyComponent({ emptyType: 1,emptyHeight:"100%" ,retry: () => {
  309 + this.isConnectNetwork = NetworkUtil.isNetConnected()
  310 + if(this.isConnectNetwork){
  311 + this.getUserInfo()
  312 + }
  313 + },})
  314 + .layoutWeight(1)
  315 + .width('100%')
  316 + }
305 } 317 }
306 - }  
307 318
308 } 319 }
309 @Builder MineHomeTitleTransparent() { 320 @Builder MineHomeTitleTransparent() {
@@ -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(){
18 - MessageListUI()  
19 - } 20 + Column(){
  21 + MessageListUI()
  22 + }
  23 + }.width("100%")
  24 + .height("100%")
  25 + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
  26 +
20 } 27 }
21 } 28 }
@@ -140,7 +140,6 @@ export struct MultiPictureListPage { @@ -140,7 +140,6 @@ export struct MultiPictureListPage {
140 .id('e_picture_container') 140 .id('e_picture_container')
141 // 设置顶部绘制延伸到状态栏 141 // 设置顶部绘制延伸到状态栏
142 // 设置底部绘制延伸到导航条 142 // 设置底部绘制延伸到导航条
143 - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])  
144 } 143 }
145 144
146 /** 145 /**
@@ -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(){
28 - SearchComponent({fromTabName:$fromTabName})  
29 - }.height('100%')  
30 - .width('100%')  
31 - .backgroundColor($r('app.color.white')) 30 + Column(){
  31 + SearchComponent({fromTabName:$fromTabName})
  32 + }.height('100%')
  33 + .width('100%')
  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(){
11 - SubscribeMessageComponent()  
12 - }.height("100%")  
13 - .width("100%") 14 + Column(){
  15 + SubscribeMessageComponent()
  16 + }.height("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,70 +36,74 @@ struct VisitorCommentPage { @@ -35,70 +36,74 @@ struct VisitorCommentPage {
35 } 36 }
36 37
37 build() { 38 build() {
38 - Column() {  
39 - //标题栏目  
40 - CustomTitleUI({ titleName: "评论列表" })  
41 - if (this.count == 0) {  
42 - if (this.isGetRequest == true) {  
43 - if(this.isConnectNetwork){  
44 - EmptyComponent({ emptyType: 10 })  
45 - .height('100%')  
46 - .width('100%')  
47 - }else{  
48 - EmptyComponent({ emptyType: 1,emptyHeight:"100%" ,retry: () => {  
49 - this.isConnectNetwork = NetworkUtil.isNetConnected()  
50 - if(this.isConnectNetwork){ 39 + Column(){
  40 + Column() {
  41 + //标题栏目
  42 + CustomTitleUI({ titleName: "评论列表" })
  43 + if (this.count == 0) {
  44 + if (this.isGetRequest == true) {
  45 + if(this.isConnectNetwork){
  46 + EmptyComponent({ emptyType: 11 })
  47 + .height('100%')
  48 + .width('100%')
  49 + }else{
  50 + EmptyComponent({ emptyType: 1,emptyHeight:"100%" ,retry: () => {
  51 + this.isConnectNetwork = NetworkUtil.isNetConnected()
  52 + if(this.isConnectNetwork){
  53 + this.curPageNum = 1;
  54 + this.hasMore = true
  55 + this.isGetRequest = false
  56 + this.data.clear()
  57 +
  58 + if (!this.isLoading) {
  59 + this.getNewPageData(this.commentTime)
  60 + }
  61 + }
  62 + }})
  63 + .layoutWeight(1)
  64 + .width('100%')
  65 + }
  66 + }
  67 + } else {
  68 + Stack(){
  69 + Row()
  70 + .width("100%")
  71 + .height("100%")
  72 + .backgroundColor($r('app.color.white'))
  73 + CustomPullToRefresh({
  74 + alldata:this.data,
  75 + scroller:this.scroller,
  76 + customList:()=>{
  77 + this.ListLayout()
  78 + },
  79 + onRefresh:(resolve)=>{
51 this.curPageNum = 1; 80 this.curPageNum = 1;
52 this.hasMore = true 81 this.hasMore = true
53 this.isGetRequest = false 82 this.isGetRequest = false
54 this.data.clear() 83 this.data.clear()
55 84
  85 + if (!this.isLoading){
  86 + this.getNewPageData(this.commentTime)
  87 + if(resolve) resolve('刷新成功')
  88 + }
  89 + },
  90 + onLoadMore:(resolve)=> {
56 if (!this.isLoading) { 91 if (!this.isLoading) {
  92 + this.isLoading = true
57 this.getNewPageData(this.commentTime) 93 this.getNewPageData(this.commentTime)
58 } 94 }
59 } 95 }
60 - }})  
61 - .layoutWeight(1)  
62 - .width('100%') 96 + })
63 } 97 }
64 } 98 }
65 - } else {  
66 - Stack(){  
67 - Row()  
68 - .width("100%")  
69 - .height("100%")  
70 - .backgroundColor($r('app.color.white'))  
71 - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])  
72 - CustomPullToRefresh({  
73 - alldata:this.data,  
74 - scroller:this.scroller,  
75 - customList:()=>{  
76 - this.ListLayout()  
77 - },  
78 - onRefresh:(resolve)=>{  
79 - this.curPageNum = 1;  
80 - this.hasMore = true  
81 - this.isGetRequest = false  
82 - this.data.clear()  
83 -  
84 - if (!this.isLoading){  
85 - this.getNewPageData(this.commentTime)  
86 - if(resolve) resolve('刷新成功')  
87 - }  
88 - },  
89 - onLoadMore:(resolve)=> {  
90 - if (!this.isLoading) {  
91 - this.isLoading = true  
92 - this.getNewPageData(this.commentTime)  
93 - }  
94 - }  
95 - })  
96 - }  
97 } 99 }
98 - }  
99 - .backgroundColor($r('app.color.color_transparent'))  
100 - .height('100%')  
101 - .width('100%') 100 + .backgroundColor($r('app.color.color_transparent'))
  101 + .height('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(){