wangliang_wd

Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool into main

* 'main' of http://192.168.1.42/developOne/harmonyPool:
  频道全屏修改
  desc:全屏 我的 主页  状态栏 颜色适配
  fix:somobug
  fix: 18449 UI还原问题-【uat】直播预告、乡村振兴、月度排行 向左滑动,“查看更多” “松手查看” 文案字体偏小
  desc:用户主页 适配全屏
  fix:somobug
  desc:全屏适配
  fix: 17543 功能缺陷-页面加载-信息流图片加载,手机打开仅wifi加载图片控制,进入教育频道,长图图片未显示
  fix:somobug
  fix: 18540 人民号动态多图图片存在部分被截断
  fix(动态详情):顶部底部适配
  fix: 1、uat】人民号>关注tab,点击号头像没有跳转到号主页
  fix: 直播预告向左滑动到底,预期显示查看更多模块,松手会跳转到直播预告详情页,实际没有效果,看图,并且更多按钮没有显示
  进入人民号-推荐,查看任意人民号-视频详情页,鸿蒙版丢失底部评论区
  fix: 18562 头图卡-设置不展示标题_客户端不该展示标题
  desc:登录相关页面 适配全屏
  desc:重置密码 适配 折叠屏
  feat: 1、直播全屏聊天室,重试机制
Showing 55 changed files with 992 additions and 735 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'))
@@ -53,7 +53,7 @@ export struct Card5Component { @@ -53,7 +53,7 @@ export struct Card5Component {
53 } 53 }
54 ) 54 )
55 .aspectRatio(343 / 225) 55 .aspectRatio(343 / 225)
56 - if (this.titleShowPolicy === 1 || this.titleShowPolicy === null || this.titleShowPolicy === '') { 56 + if (!!this.titleShowPolicy) {
57 Row() 57 Row()
58 .borderRadius( 58 .borderRadius(
59 { 59 {
@@ -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
@@ -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,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 // 私有方法
@@ -206,6 +206,7 @@ export struct PeopleShipHomeArticleListComponent { @@ -206,6 +206,7 @@ export struct PeopleShipHomeArticleListComponent {
206 } 206 }
207 for (const element of listData.list) { 207 for (const element of listData.list) {
208 let contentDTO = new ContentDTO() 208 let contentDTO = new ContentDTO()
  209 + console.info(TAG, 'element.appStyle'+`${element.appStyle}`)
209 contentDTO.appStyle = this.changeCommon(element.appStyle) 210 contentDTO.appStyle = this.changeCommon(element.appStyle)
210 contentDTO.newsTitle = element.title; 211 contentDTO.newsTitle = element.title;
211 contentDTO.newsSummary = element.description; 212 contentDTO.newsSummary = element.description;
@@ -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 }
@@ -158,6 +158,7 @@ export struct OperRowListView { @@ -158,6 +158,7 @@ export struct OperRowListView {
158 console.info(TAG, 'contentDetailData----', JSON.stringify(this.contentDetailData)) 158 console.info(TAG, 'contentDetailData----', JSON.stringify(this.contentDetailData))
159 console.info(TAG, 'likeBean----', JSON.stringify(this.likeBean)) 159 console.info(TAG, 'likeBean----', JSON.stringify(this.likeBean))
160 console.info(TAG, 'this.operationButtonList', JSON.stringify(this.operationButtonList)) 160 console.info(TAG, 'this.operationButtonList', JSON.stringify(this.operationButtonList))
  161 +
161 // 评论需要数据 162 // 评论需要数据
162 /* this.publishCommentModel.targetId = this.contentDetailData.newsId + '' 163 /* this.publishCommentModel.targetId = this.contentDetailData.newsId + ''
163 this.publishCommentModel.targetRelId = this.contentDetailData.reLInfo?.relId + '' 164 this.publishCommentModel.targetRelId = this.contentDetailData.reLInfo?.relId + ''
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(){
@@ -40,8 +40,6 @@ export struct DetailPlayLivePage { @@ -40,8 +40,6 @@ export struct DetailPlayLivePage {
40 @State lastInputedLiveComment: LiveRoomItemBean = {} as LiveRoomItemBean // 上次输入的直播间消息 40 @State lastInputedLiveComment: LiveRoomItemBean = {} as LiveRoomItemBean // 上次输入的直播间消息
41 @State lastInputedChatComment: LiveRoomItemBean = {} as LiveRoomItemBean // 上次输入的大家聊消息 41 @State lastInputedChatComment: LiveRoomItemBean = {} as LiveRoomItemBean // 上次输入的大家聊消息
42 42
43 -  
44 -  
45 aboutToAppear(): void { 43 aboutToAppear(): void {
46 Logger.info(TAG, `wyj-aboutToAppear`) 44 Logger.info(TAG, `wyj-aboutToAppear`)
47 45
@@ -69,9 +67,8 @@ export struct DetailPlayLivePage { @@ -69,9 +67,8 @@ export struct DetailPlayLivePage {
69 build() { 67 build() {
70 Column() { 68 Column() {
71 69
72 - TopPlayComponent({ playerController: this.playerController })  
73 - .height(this.displayDirection == DisplayDirection.VERTICAL ? 211 : '100%')  
74 - 70 + TopPlayComponent({ playerController: this.playerController })
  71 + .height(this.displayDirection == DisplayDirection.VERTICAL ? 211 : '100%')
75 72
76 TabComponent({ 73 TabComponent({
77 tabs: this.tabs, 74 tabs: this.tabs,
1 -import { LiveRoomDataBean } from 'wdBean/Index'; 1 +import { ContentDetailDTO, LiveRoomDataBean } from 'wdBean/Index';
2 import { LiveViewModel } from '../viewModel/LiveViewModel'; 2 import { LiveViewModel } from '../viewModel/LiveViewModel';
3 import { WindowModel } from 'wdKit/Index'; 3 import { WindowModel } from 'wdKit/Index';
4 import { PlayerComponent } from '../widgets/vertical/PlayerComponent'; 4 import { PlayerComponent } from '../widgets/vertical/PlayerComponent';
@@ -22,6 +22,7 @@ export struct DetailPlayVLivePage { @@ -22,6 +22,7 @@ export struct DetailPlayVLivePage {
22 private liveViewModel: LiveViewModel = new LiveViewModel() 22 private liveViewModel: LiveViewModel = new LiveViewModel()
23 private playerController: WDAliPlayerController = new WDAliPlayerController(); 23 private playerController: WDAliPlayerController = new WDAliPlayerController();
24 private swiperController: SwiperController = new SwiperController() 24 private swiperController: SwiperController = new SwiperController()
  25 + @Consume contentDetailData: ContentDetailDTO
25 @Provide bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 26 @Provide bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
26 @Provide topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 27 @Provide topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
27 @Provide liveRoomDataBean: LiveRoomDataBean = {} as LiveRoomDataBean 28 @Provide liveRoomDataBean: LiveRoomDataBean = {} as LiveRoomDataBean
@@ -36,6 +37,9 @@ export struct DetailPlayVLivePage { @@ -36,6 +37,9 @@ export struct DetailPlayVLivePage {
36 @Consume contentId: string 37 @Consume contentId: string
37 @State swiperIndex: number = 1 38 @State swiperIndex: number = 1
38 @Consume liveDetailPageLogic: LiveDetailPageLogic 39 @Consume liveDetailPageLogic: LiveDetailPageLogic
  40 + //播放错误
  41 + @State isPlayerError: boolean = false
  42 + @State isCanplay: boolean = false
39 43
40 aboutToAppear(): void { 44 aboutToAppear(): void {
41 this.openFullScreen() 45 this.openFullScreen()
@@ -78,28 +82,27 @@ export struct DetailPlayVLivePage { @@ -78,28 +82,27 @@ export struct DetailPlayVLivePage {
78 LiveEmptyComponent({ 82 LiveEmptyComponent({
79 emptyType: WDLiveViewDefaultType.WDViewDefaultType_NoLiveSuspend 83 emptyType: WDLiveViewDefaultType.WDViewDefaultType_NoLiveSuspend
80 }) 84 })
81 - .height('40%').margin({top:this.topSafeHeight }) 85 + .height('40%').margin({ top: this.topSafeHeight })
82 } else { 86 } else {
83 87
84 if (this.liveDetailPageLogic.showPad) { 88 if (this.liveDetailPageLogic.showPad) {
85 // 有垫片 89 // 有垫片
86 - if(this.liveDetailPageLogic.padImageUri.length > 0){ 90 + if (this.liveDetailPageLogic.padImageUri.length > 0) {
87 // 配置了垫片资源 91 // 配置了垫片资源
88 Image(this.liveDetailPageLogic.padImageUri).objectFit(ImageFit.Fill).width('100%').height('100%') 92 Image(this.liveDetailPageLogic.padImageUri).objectFit(ImageFit.Fill).width('100%').height('100%')
89 93
90 - }else {  
91 - // 没有配置垫片资源 94 + } else {
  95 + // 没有配置垫片资源
92 LiveEmptyComponent({ 96 LiveEmptyComponent({
93 emptyType: WDLiveViewDefaultType.WDViewDefaultType_NoLiveSuspend 97 emptyType: WDLiveViewDefaultType.WDViewDefaultType_NoLiveSuspend
94 }) 98 })
95 - .height('40%').margin({top:this.topSafeHeight }) 99 + .height('40%').margin({ top: this.topSafeHeight })
96 } 100 }
97 101
98 -  
99 } else { 102 } else {
100 // 播放器 103 // 播放器
101 PlayerComponent({ 104 PlayerComponent({
102 - playerController: this.playerController 105 + playerController: this.playerController, isPlayerError: this.isPlayerError, isCanplay: this.isCanplay
103 }) 106 })
104 } 107 }
105 } 108 }
@@ -110,6 +113,44 @@ export struct DetailPlayVLivePage { @@ -110,6 +113,44 @@ export struct DetailPlayVLivePage {
110 swiperController: this.swiperController, 113 swiperController: this.swiperController,
111 swiperIndex: $swiperIndex 114 swiperIndex: $swiperIndex
112 }) 115 })
  116 +
  117 + // 直播资源加载失败
  118 + Column() {
  119 + Text('直播加载中,请稍候重试')
  120 + .fontSize('20fp')
  121 + .fontWeight(500)
  122 + .margin({ top: 16 })
  123 + .fontColor(Color.White)
  124 +
  125 + Button('点击重试')
  126 + .type(ButtonType.Normal)
  127 + .width(80)
  128 + .height(28)
  129 + .backgroundColor(Color.Transparent)
  130 + .fontColor('#ffcccccc')
  131 + .border({ width: 1 })
  132 + .borderColor('#4dffffff')
  133 + .borderRadius(4)
  134 + .fontSize($r('app.float.font_size_12'))
  135 + .margin({ top: 16 })
  136 + .padding(0)
  137 + .onClick(() => {
  138 +
  139 + this.isCanplay = false
  140 + this.isPlayerError = false
  141 + this.playerController?.firstPlay(this.playUrl, TrackConstants.PageName.Live_Detail, {
  142 + 'contentType': `${this.contentDetailData.newsType}`,
  143 + 'contentId': `${this.contentDetailData.newsId}`,
  144 + 'contentName': `${this.contentDetailData.newsTitle || ''}`,
  145 + });
  146 + })
  147 + }
  148 + .width('100%')
  149 + .margin({ top: 195 })
  150 + .justifyContent(FlexAlign.Center)
  151 + .visibility(this.isPlayerError ? Visibility.Visible :
  152 + Visibility.None)
  153 +
113 // 清屏按钮 154 // 清屏按钮
114 Image($r('app.media.icon_live_more')) 155 Image($r('app.media.icon_live_more'))
115 .width(40) 156 .width(40)
@@ -25,7 +25,7 @@ export struct TopPlayComponent { @@ -25,7 +25,7 @@ export struct TopPlayComponent {
25 //已结束直播 25 //已结束直播
26 @State isEnd: boolean = false 26 @State isEnd: boolean = false
27 //播放错误 27 //播放错误
28 - @State isError: boolean = false 28 + @State isPlayerError: boolean = false
29 // loading 控制字段 29 // loading 控制字段
30 @State isHideLoading: boolean = false 30 @State isHideLoading: boolean = false
31 // 获取播放资源能播放了 31 // 获取播放资源能播放了
@@ -50,14 +50,14 @@ export struct TopPlayComponent { @@ -50,14 +50,14 @@ export struct TopPlayComponent {
50 this.playSourceState = status 50 this.playSourceState = status
51 Logger.debug(TAG, 'status==>' + status) 51 Logger.debug(TAG, 'status==>' + status)
52 if (status === PlayerConstants.STATUS_ERROR) { 52 if (status === PlayerConstants.STATUS_ERROR) {
53 - this.isError = true 53 + this.isPlayerError = true
54 this.isHideLoading = true 54 this.isHideLoading = true
55 this.isCanPlay = false 55 this.isCanPlay = false
56 } else if (status === PlayerConstants.STATUS_COMPLETION) { 56 } else if (status === PlayerConstants.STATUS_COMPLETION) {
57 // 播放完成 57 // 播放完成
58 58
59 } else { 59 } else {
60 - this.isError = false 60 + this.isPlayerError = false
61 } 61 }
62 62
63 } 63 }
@@ -186,7 +186,7 @@ export struct TopPlayComponent { @@ -186,7 +186,7 @@ export struct TopPlayComponent {
186 onLoad: async () => { 186 onLoad: async () => {
187 if (StringUtils.isNotEmpty(this.playUrl)) { 187 if (StringUtils.isNotEmpty(this.playUrl)) {
188 this.isHideLoading = false 188 this.isHideLoading = false
189 - this.isError = false 189 + this.isPlayerError = false
190 this.xComponentIsLoaded = true 190 this.xComponentIsLoaded = true
191 Logger.debug(TAG, `---onLoad------>`) 191 Logger.debug(TAG, `---onLoad------>`)
192 this.tryToPlay() 192 this.tryToPlay()
@@ -265,12 +265,12 @@ export struct TopPlayComponent { @@ -265,12 +265,12 @@ export struct TopPlayComponent {
265 .padding(0) 265 .padding(0)
266 .onClick(() => { 266 .onClick(() => {
267 this.isHideLoading = false 267 this.isHideLoading = false
268 - this.isError = false 268 + this.isPlayerError = false
269 this.xComponentIsLoaded = true 269 this.xComponentIsLoaded = true
270 this.tryToPlay() 270 this.tryToPlay()
271 271
272 }) 272 })
273 - }.width('100%').visibility(this.isError ? Visibility.Visible : 273 + }.width('100%').visibility(this.isPlayerError ? Visibility.Visible :
274 Visibility.None) 274 Visibility.None)
275 275
276 } 276 }
1 import { ContentDetailDTO } from 'wdBean/Index'; 1 import { ContentDetailDTO } from 'wdBean/Index';
2 -import { AliPlayerRenderView, WDAliPlayerController, WDPlayerRenderVLiveView } from 'wdPlayer/Index'; 2 +import { AliPlayerRenderView, PlayerConstants, WDAliPlayerController, WDPlayerRenderVLiveView } from 'wdPlayer/Index';
3 import { ParamType, TrackConstants } from 'wdTracking/Index'; 3 import { ParamType, TrackConstants } from 'wdTracking/Index';
4 import { PictureLoading } from './PictureLoading'; 4 import { PictureLoading } from './PictureLoading';
5 5
@@ -20,8 +20,10 @@ export struct PlayerComponent { @@ -20,8 +20,10 @@ export struct PlayerComponent {
20 // 0-横屏流画面,1-竖屏幕流画面 20 // 0-横屏流画面,1-竖屏幕流画面
21 @State liveStreamType: number | null = -1 21 @State liveStreamType: number | null = -1
22 @State playUrl: string = '' 22 @State playUrl: string = ''
23 - @State isCanplay: boolean = false  
24 pageParam: ParamType = {} 23 pageParam: ParamType = {}
  24 + // 播放失败
  25 + @Link isPlayerError: boolean
  26 + @Link isCanplay: boolean
25 27
26 pageShowChange() { 28 pageShowChange() {
27 this.playerController?.play() 29 this.playerController?.play()
@@ -31,10 +33,33 @@ export struct PlayerComponent { @@ -31,10 +33,33 @@ export struct PlayerComponent {
31 this.playerController?.pause() 33 this.playerController?.pause()
32 } 34 }
33 35
34 - async aboutToAppear(): Promise<void> { 36 + aboutToAppear(){
  37 +
  38 + if (this.playerController) {
  39 + this.playerController.onCanplay = () => {
  40 + this.isCanplay = true
  41 + this.playerController?.play()
  42 + }
  43 + this.playerController.onStatusChange = (status: number) => {
  44 + if (status === PlayerConstants.STATUS_ERROR) {
  45 + this.isPlayerError = true
  46 + this.isCanplay = true
  47 + } else if (status === PlayerConstants.STATUS_COMPLETION) {
  48 + // 播放完成
  49 +
  50 + } else {
  51 + //this.isPlayerError = false
  52 + }
  53 +
  54 + }
  55 + }
  56 +
  57 +
35 setTimeout(() => { 58 setTimeout(() => {
36 this.updateData() 59 this.updateData()
37 }, 10) 60 }, 10)
  61 +
  62 +
38 } 63 }
39 64
40 async aboutToDisappear(): Promise<void> { 65 async aboutToDisappear(): Promise<void> {
@@ -65,49 +90,41 @@ export struct PlayerComponent { @@ -65,49 +90,41 @@ export struct PlayerComponent {
65 this.liveStreamType = liveStreamType 90 this.liveStreamType = liveStreamType
66 this.playUrl = playUrl 91 this.playUrl = playUrl
67 } 92 }
68 - console.error("XXXXZZZZ", 'updateData ----liveState==>' + this.playUrl)  
69 } 93 }
70 94
71 build() { 95 build() {
72 - Column() {  
73 - Stack() {  
74 - // TODO:判断横竖屏,liveStreamType=1竖屏铺满屏幕,裁剪不拉伸,liveStreamType=0横屏正常展示  
75 - if (this.liveStreamType == null || this.liveStreamType == 1) {  
76 - WDPlayerRenderVLiveView({  
77 - playerController: this.playerController,  
78 - onLoad: () => {  
79 - this.isCanplay = true  
80 - this.contentTrackingDict()  
81 - this.playerController?.firstPlay(this.playUrl, TrackConstants.PageName.Live_Detail, this.pageParam);  
82 - }  
83 - })  
84 - } else if (this.liveStreamType == 0) {  
85 - AliPlayerRenderView({  
86 - playerController: this.playerController,  
87 - onLoad: () => {  
88 - this.isCanplay = true  
89 - this.contentTrackingDict()  
90 - this.playerController?.firstPlay(this.playUrl, TrackConstants.PageName.Live_Detail, this.pageParam);  
91 - }  
92 - }).margin({ top: 195 }).height(211)  
93 - } 96 + Stack() {
  97 + // TODO:判断横竖屏,liveStreamType=1竖屏铺满屏幕,裁剪不拉伸,liveStreamType=0横屏正常展示
  98 + if (this.liveStreamType == null || this.liveStreamType == 1) {
  99 + WDPlayerRenderVLiveView({
  100 + playerController: this.playerController,
  101 + onLoad: () => {
  102 + console.error("XXXXZZZZ", '-------------1--------' + this.playUrl)
  103 + this.isCanplay = true
  104 + this.contentTrackingDict()
  105 + this.playerController?.firstPlay(this.playUrl, TrackConstants.PageName.Live_Detail, this.pageParam);
  106 + }
  107 + })
  108 + } else if (this.liveStreamType == 0) {
  109 + AliPlayerRenderView({
  110 + playerController: this.playerController,
  111 + onLoad: () => {
  112 + this.isCanplay = true
  113 + this.contentTrackingDict()
  114 + this.playerController?.firstPlay(this.playUrl, TrackConstants.PageName.Live_Detail, this.pageParam);
  115 + }
  116 + }).margin({ top: 195 }).height(211)
  117 + }
94 118
95 - PictureLoading().visibility(this.isCanplay ? Visibility.None : Visibility.Visible) 119 + PictureLoading().visibility(this.isCanplay ? Visibility.None : Visibility.Visible)
96 120
97 - }  
98 - .height('100%')  
99 - .width('100%')  
100 - .align(Alignment.Top)  
101 - .alignContent(Alignment.Top)  
102 - .onClick(() => {  
103 - if (this.liveState === 'end') {  
104 - this.isShowControl = !this.isShowControl  
105 - }  
106 - })  
107 121
108 } 122 }
109 .height('100%') 123 .height('100%')
110 .width('100%') 124 .width('100%')
  125 + .align(Alignment.Top)
  126 + .alignContent(Alignment.Top)
  127 +
111 } 128 }
112 129
113 contentTrackingDict() { 130 contentTrackingDict() {
@@ -172,6 +172,7 @@ export struct DetailPlayShortVideoPage { @@ -172,6 +172,7 @@ export struct DetailPlayShortVideoPage {
172 this.queryNewsInfoOfUser() 172 this.queryNewsInfoOfUser()
173 173
174 this.contentTrackingDict() 174 this.contentTrackingDict()
  175 + this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '')
175 } 176 }
176 177
177 contentTrackingDict() { 178 contentTrackingDict() {
@@ -45,7 +45,7 @@ export struct VideoChannelDetail { @@ -45,7 +45,7 @@ export struct VideoChannelDetail {
45 @Prop @Watch('autoRefreshChange') autoRefresh: number = 0 45 @Prop @Watch('autoRefreshChange') autoRefresh: number = 0
46 @Consume barBackgroundColor: Color 46 @Consume barBackgroundColor: Color
47 private swiperController: SwiperController = new SwiperController() 47 private swiperController: SwiperController = new SwiperController()
48 - @Provide showComment: boolean = false 48 + @Consume showComment: boolean
49 @Provide windowWidth: number = AppStorage.get<number>('windowWidth') || 0 49 @Provide windowWidth: number = AppStorage.get<number>('windowWidth') || 0
50 @Provide windowHeight: number = AppStorage.get<number>('windowHeight') || 0 50 @Provide windowHeight: number = AppStorage.get<number>('windowHeight') || 0
51 @Provide bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 51 @Provide bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
@@ -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())
1 -@Entry  
2 -@Component  
3 -struct Index {  
4 - @State message: string = 'Hello World';  
5 -  
6 - build() {  
7 - Row() {  
8 - Column() {  
9 - Text(this.message)  
10 - .fontSize(50)  
11 - .fontWeight(FontWeight.Bold)  
12 - }  
13 - .width('100%')  
14 - }  
15 - .height('100%')  
16 - }  
17 -}  
@@ -24,6 +24,8 @@ struct ChangeBindPhonePage { @@ -24,6 +24,8 @@ struct ChangeBindPhonePage {
24 lastTime: number = 0 24 lastTime: number = 0
25 pageShowTime:number = 0; 25 pageShowTime:number = 0;
26 pageHideTime:number = 0; 26 pageHideTime:number = 0;
  27 + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
  28 + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
27 29
28 30
29 onPageShow() { 31 onPageShow() {
@@ -58,104 +60,109 @@ struct ChangeBindPhonePage { @@ -58,104 +60,109 @@ struct ChangeBindPhonePage {
58 60
59 61
60 build() { 62 build() {
61 - Column() {  
62 - Image($r('app.media.login_back_icon')).width(24).height(24).margin({ left: 15, top: 10 }).onClick(() => {  
63 - router.back()  
64 - }) 63 + Column(){
  64 + Column() {
  65 + Image($r('app.media.login_back_icon')).width(24).height(24).margin({ left: 15, top: 10 }).onClick(() => {
  66 + router.back()
  67 + })
65 68
66 - Text(this.pageTitle).fontSize(22).fontColor('#333333').fontWeight(FontWeight.Bold).margin({ left: 25, top: 112 }) 69 + Text(this.pageTitle).fontSize(22).fontColor('#333333').fontWeight(FontWeight.Bold).margin({ left: 25, top: 112 })
67 70
68 - Column(){  
69 - TextInput({text: this.phoneContent, placeholder: "请输入手机号" })  
70 - .fontSize(16)  
71 - .height(48)  
72 - .placeholderColor("#CCCCCC")  
73 - .maxLength(11)  
74 - .margin({ top: 36 })  
75 - .backgroundColor("#F5F5F5")  
76 - .borderRadius(4)  
77 - .type(InputType.Number)  
78 - .onChange((content) => {  
79 - this.phoneContent = content  
80 - this.isSubmit = (this.phoneContent.length >= 11 && this.codeContent.length >= 4)  
81 -  
82 - if (content.length >= 11 ) {  
83 - this.codeBtnState = true  
84 - } else {  
85 - this.codeBtnState = false  
86 - }  
87 - })  
88 -  
89 -  
90 - Row() {  
91 - TextInput({ text: this.codeContent,placeholder: "验证码" })  
92 - .placeholderColor("#CCCCCC")  
93 - .layoutWeight(1) 71 + Column(){
  72 + TextInput({text: this.phoneContent, placeholder: "请输入手机号" })
94 .fontSize(16) 73 .fontSize(16)
95 .height(48) 74 .height(48)
  75 + .placeholderColor("#CCCCCC")
  76 + .maxLength(11)
  77 + .margin({ top: 36 })
  78 + .backgroundColor("#F5F5F5")
  79 + .borderRadius(4)
96 .type(InputType.Number) 80 .type(InputType.Number)
97 - .fontColor("#222222")  
98 - .backgroundColor("#00000000")  
99 - .borderRadius({ topLeft: 4, bottomLeft: 4 })  
100 - .onChange((value) => {  
101 - this.codeContent = value 81 + .onChange((content) => {
  82 + this.phoneContent = content
102 this.isSubmit = (this.phoneContent.length >= 11 && this.codeContent.length >= 4) 83 this.isSubmit = (this.phoneContent.length >= 11 && this.codeContent.length >= 4)
103 - })  
104 84
105 - Text(this.codeStateSuccess ? this.timeCount + "s" : this.isFirst?"发送验证码":'重新获取')  
106 - .fontColor(this.codeBtnState?'#ED2800':'#80ED2800')  
107 - .width(110)  
108 - .fontSize(14)  
109 - .fontWeight( FontWeight.Bold)  
110 - .height(48)  
111 - .textAlign(TextAlign.Center)  
112 - .enabled(this.codeStateSuccess?false:true)  
113 - .onClick(() => {  
114 - if (this.phoneContent.length < 11) {  
115 - return 85 + if (content.length >= 11 ) {
  86 + this.codeBtnState = true
  87 + } else {
  88 + this.codeBtnState = false
116 } 89 }
  90 + })
117 91
118 - let currentTime = DateTimeUtils.getTimeStamp()  
119 - if (currentTime - this.lastTime < 500) {  
120 - return  
121 - }  
122 - this.lastTime = currentTime;  
123 - this.isCodeSend = true  
124 92
  93 + Row() {
  94 + TextInput({ text: this.codeContent,placeholder: "验证码" })
  95 + .placeholderColor("#CCCCCC")
  96 + .layoutWeight(1)
  97 + .fontSize(16)
  98 + .height(48)
  99 + .type(InputType.Number)
  100 + .fontColor("#222222")
  101 + .backgroundColor("#00000000")
  102 + .borderRadius({ topLeft: 4, bottomLeft: 4 })
  103 + .onChange((value) => {
  104 + this.codeContent = value
  105 + this.isSubmit = (this.phoneContent.length >= 11 && this.codeContent.length >= 4)
  106 + })
  107 +
  108 + Text(this.codeStateSuccess ? this.timeCount + "s" : this.isFirst?"发送验证码":'重新获取')
  109 + .fontColor(this.codeBtnState?'#ED2800':'#80ED2800')
  110 + .width(110)
  111 + .fontSize(14)
  112 + .fontWeight( FontWeight.Bold)
  113 + .height(48)
  114 + .textAlign(TextAlign.Center)
  115 + .enabled(this.codeStateSuccess?false:true)
  116 + .onClick(() => {
  117 + if (this.phoneContent.length < 11) {
  118 + return
  119 + }
  120 +
  121 + let currentTime = DateTimeUtils.getTimeStamp()
  122 + if (currentTime - this.lastTime < 500) {
  123 + return
  124 + }
  125 + this.lastTime = currentTime;
  126 + this.isCodeSend = true
  127 +
  128 + })
  129 +
  130 +
  131 + }.margin({ top: 12 })
  132 + .height(48)
  133 + .alignItems(VerticalAlign.Center)
  134 + .justifyContent(FlexAlign.Start)
  135 + .backgroundImage($r('app.media.code_login_bg'))
  136 + .backgroundImageSize({width:'100%',height:48})
  137 + }.width('100%')
  138 + .padding({ left: 25, right: 25 })
  139 +
  140 +
  141 + Row() {
  142 + Text("确认")
  143 + .layoutWeight(1)
  144 + .fontColor("#FFFFFF")
  145 + .borderRadius(4)
  146 + .fontSize(18)
  147 + .textAlign(TextAlign.Center)
  148 + .fontWeight(FontWeight.Medium)
  149 + .margin({ top: 26 })
  150 + .height(44)
  151 + .backgroundColor("#ED2800")
  152 + .enabled(this.isSubmit ? true : false)
  153 + .opacity(this.isSubmit ? 1: 0.6)
  154 + .onClick(() => {
  155 + TrackingButton.click("changePhoneNumberPageConfirm",TrackConstants.PageName.Change_PhoneNum,TrackConstants.PageName.Change_PhoneNum)
  156 + this.changeBindPhone()
125 }) 157 })
  158 + }.width('100%')
  159 + .padding({ left: 25, right: 25 })
126 160
  161 + }.width('100%').height('100%').alignItems(HorizontalAlign.Start)
  162 + }.width("100%")
  163 + .height("100%")
  164 + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
127 165
128 - }.margin({ top: 12 })  
129 - .height(48)  
130 - .alignItems(VerticalAlign.Center)  
131 - .justifyContent(FlexAlign.Start)  
132 - .backgroundImage($r('app.media.code_login_bg'))  
133 - .backgroundImageSize({width:'100%',height:48})  
134 - }.width('100%')  
135 - .padding({ left: 25, right: 25 })  
136 -  
137 -  
138 - Row() {  
139 - Text("确认")  
140 - .layoutWeight(1)  
141 - .fontColor("#FFFFFF")  
142 - .borderRadius(4)  
143 - .fontSize(18)  
144 - .textAlign(TextAlign.Center)  
145 - .fontWeight(FontWeight.Medium)  
146 - .margin({ top: 26 })  
147 - .height(44)  
148 - .backgroundColor("#ED2800")  
149 - .enabled(this.isSubmit ? true : false)  
150 - .opacity(this.isSubmit ? 1: 0.6)  
151 - .onClick(() => {  
152 - TrackingButton.click("changePhoneNumberPageConfirm",TrackConstants.PageName.Change_PhoneNum,TrackConstants.PageName.Change_PhoneNum)  
153 - this.changeBindPhone()  
154 - })  
155 - }.width('100%')  
156 - .padding({ left: 25, right: 25 })  
157 -  
158 - }.width('100%').height('100%').alignItems(HorizontalAlign.Start)  
159 } 166 }
160 167
161 //发送验证码 168 //发送验证码
@@ -23,6 +23,8 @@ struct ForgetPasswordPage { @@ -23,6 +23,8 @@ struct ForgetPasswordPage {
23 @State pageTitle:string = '找回密码'; 23 @State pageTitle:string = '找回密码';
24 @State isForgetPassword: number = 0 //是否是登录页忘记密码过来的,标题不一样 24 @State isForgetPassword: number = 0 //是否是登录页忘记密码过来的,标题不一样
25 @State codeStateSuccess:boolean=false 25 @State codeStateSuccess:boolean=false
  26 + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
  27 + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
26 onCodeSend() { 28 onCodeSend() {
27 if (this.isCodeSend) { 29 if (this.isCodeSend) {
28 this.sendVerifyCode() 30 this.sendVerifyCode()
@@ -43,42 +45,48 @@ struct ForgetPasswordPage { @@ -43,42 +45,48 @@ struct ForgetPasswordPage {
43 45
44 46
45 build() { 47 build() {
46 - Column() {  
47 - Image($r('app.media.login_back_icon')).width(24).height(24).margin({ left: 15, top: 10 }).onClick(() => {  
48 - router.back()  
49 - }) 48 + Column(){
  49 + Column() {
  50 + Image($r('app.media.login_back_icon')).width(24).height(24).margin({ left: 15, top: 10 }).onClick(() => {
  51 + router.back()
  52 + })
  53 +
  54 + Text(this.pageTitle).fontSize(22).fontColor('#333333').fontWeight(FontWeight.Bold).margin({ left: 25, top: 112 })
  55 + LoginInputComponent({
  56 + phoneContent: $phoneContent,
  57 + codeContent: $codeContent,
  58 + isSubmit: $isSubmit,
  59 + isCodeSend: $isCodeSend,
  60 + pageType:0,
  61 + codeStateSuccess:$codeStateSuccess
  62 + })
  63 + Row() {
  64 + Text("确认")
  65 + .layoutWeight(1)
  66 + .fontColor("#FFFFFF")
  67 + .borderRadius(4)
  68 + .fontSize(18)
  69 + .textAlign(TextAlign.Center)
  70 + .fontWeight(FontWeight.Medium)
  71 + .margin({ top: 26 })
  72 + .height(44)
  73 + .backgroundColor("#ED2800")
  74 + .enabled(this.isSubmit ? true : false)
  75 + .opacity(this.isSubmit ? 1: 0.6)
  76 + .onClick(() => {
  77 + this.checkVerifyCode()
  78 + })
  79 + }.padding({ left: 25, right: 25 }).width('100%')
  80 +
  81 + }.width('100%')
  82 + .height('100%')
  83 + .alignItems(HorizontalAlign.Start)
  84 + .backgroundColor(Color.White)
  85 +
  86 + }.width("100%")
  87 + .height("100%")
  88 + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
50 89
51 - Text(this.pageTitle).fontSize(22).fontColor('#333333').fontWeight(FontWeight.Bold).margin({ left: 25, top: 112 })  
52 - LoginInputComponent({  
53 - phoneContent: $phoneContent,  
54 - codeContent: $codeContent,  
55 - isSubmit: $isSubmit,  
56 - isCodeSend: $isCodeSend,  
57 - pageType:0,  
58 - codeStateSuccess:$codeStateSuccess  
59 - })  
60 - Row() {  
61 - Text("确认")  
62 - .layoutWeight(1)  
63 - .fontColor("#FFFFFF")  
64 - .borderRadius(4)  
65 - .fontSize(18)  
66 - .textAlign(TextAlign.Center)  
67 - .fontWeight(FontWeight.Medium)  
68 - .margin({ top: 26 })  
69 - .height(44)  
70 - .backgroundColor("#ED2800")  
71 - .enabled(this.isSubmit ? true : false)  
72 - .opacity(this.isSubmit ? 1: 0.6)  
73 - .onClick(() => {  
74 - this.checkVerifyCode()  
75 - })  
76 - }.padding({ left: 25, right: 25 }).width('100%')  
77 -  
78 - }.width('100%')  
79 - .height('100%')  
80 - .alignItems(HorizontalAlign.Start)  
81 - .backgroundColor(Color.White)  
82 } 90 }
83 91
84 aboutToAppear() { 92 aboutToAppear() {
@@ -27,6 +27,8 @@ const TAG = "LoginPage" @@ -27,6 +27,8 @@ const TAG = "LoginPage"
27 @Entry 27 @Entry
28 @Component 28 @Component
29 struct LoginPage { 29 struct LoginPage {
  30 + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
  31 + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
30 @State codeBtnState: boolean = false 32 @State codeBtnState: boolean = false
31 @State timeCount: number = 60 33 @State timeCount: number = 60
32 phoneController: TextInputController = new TextInputController() 34 phoneController: TextInputController = new TextInputController()
@@ -104,7 +106,8 @@ struct LoginPage { @@ -104,7 +106,8 @@ struct LoginPage {
104 } 106 }
105 107
106 build() { 108 build() {
107 - Stack() { 109 + Column(){
  110 + Stack() {
108 RelativeContainer() { 111 RelativeContainer() {
109 112
110 //注册内容 113 //注册内容
@@ -166,7 +169,7 @@ struct LoginPage { @@ -166,7 +169,7 @@ struct LoginPage {
166 .fontWeight(400) 169 .fontWeight(400)
167 .margin({ top: `${this.calcHeight(20)}` }) 170 .margin({ top: `${this.calcHeight(20)}` })
168 .lineHeight(`${this.calcHeight(50)}lpx`) 171 .lineHeight(`${this.calcHeight(50)}lpx`)
169 - .height(44) 172 + .height(44)
170 .textAlign(TextAlign.Center) 173 .textAlign(TextAlign.Center)
171 .width("100%") 174 .width("100%")
172 .backgroundColor("#ED2800") 175 .backgroundColor("#ED2800")
@@ -242,8 +245,12 @@ struct LoginPage { @@ -242,8 +245,12 @@ struct LoginPage {
242 .visibility(this.isProtocol ? Visibility.Visible : Visibility.None) 245 .visibility(this.isProtocol ? Visibility.Visible : Visibility.None)
243 246
244 }.width('100%') 247 }.width('100%')
245 - .height('100%') 248 + .height("100%")
246 .backgroundColor(Color.White) 249 .backgroundColor(Color.White)
  250 + }.width("100%")
  251 + .height("100%")
  252 + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
  253 +
247 } 254 }
248 255
249 @Builder 256 @Builder
@@ -10,6 +10,8 @@ const TAG = 'LoginProtocolWebview'; @@ -10,6 +10,8 @@ const TAG = 'LoginProtocolWebview';
10 @Entry 10 @Entry
11 @Component 11 @Component
12 struct LoginProtocolWebview { 12 struct LoginProtocolWebview {
  13 + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
  14 + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
13 webUrl: string = '' 15 webUrl: string = ''
14 webviewController: webview.WebviewController = new webview.WebviewController() 16 webviewController: webview.WebviewController = new webview.WebviewController()
15 userProtocol = "https://cdnpeoplefrontuat.aikan.pdnews.cn/rmrb/rmrb-protocol-zh-web/0.0.1/app/protocol-1005.html" 17 userProtocol = "https://cdnpeoplefrontuat.aikan.pdnews.cn/rmrb/rmrb-protocol-zh-web/0.0.1/app/protocol-1005.html"
@@ -55,38 +57,42 @@ struct LoginProtocolWebview { @@ -55,38 +57,42 @@ struct LoginProtocolWebview {
55 } 57 }
56 58
57 build() { 59 build() {
  60 + Column(){
  61 + Column() {
  62 + Row() {
  63 + Image($r("app.media.login_back_icon"))
  64 + .width(24)
  65 + .aspectRatio(1)
  66 + .onClick(() => {
  67 + if(this.webviewController.accessBackward()){
  68 + this.webviewController.backward()
  69 + return
  70 + }
  71 + router.back();
  72 + }).margin({ left: 16 })
  73 + Text()
  74 + }
  75 + .alignItems(VerticalAlign.Center)
  76 + .width('100%')
  77 + .height(44)
58 78
59 - Column() {  
60 - Row() {  
61 - Image($r("app.media.login_back_icon"))  
62 - .width(24)  
63 - .aspectRatio(1)  
64 - .onClick(() => {  
65 - if(this.webviewController.accessBackward()){  
66 - this.webviewController.backward()  
67 - return  
68 - }  
69 - router.back();  
70 - }).margin({ left: 16 })  
71 - Text() 79 + Web({ src: this.webUrl, controller: this.webviewController })
  80 + .domStorageAccess(true)
  81 + .databaseAccess(true)
  82 + .javaScriptAccess(true)
  83 + .zoomAccess(false)
  84 + .horizontalScrollBarAccess(false)
  85 + .verticalScrollBarAccess(false)
  86 + .onHttpErrorReceive((event) => {
  87 + //TODO 页面加载不成功的时候处理
  88 + Logger.info(TAG, 'onHttpErrorReceive event.request.getRequestUrl:' + event?.request.getRequestUrl());
  89 + Logger.info(TAG, 'onHttpErrorReceive event.response.getResponseCode:' + event?.response.getResponseCode());
  90 + })
  91 + .padding({bottom:this.contentID === "2" ? "40lpx" : 0 })
72 } 92 }
73 - .alignItems(VerticalAlign.Center)  
74 - .width('100%')  
75 - .height(44) 93 + }.width("100%")
  94 + .height("100%")
  95 + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
76 96
77 - Web({ src: this.webUrl, controller: this.webviewController })  
78 - .domStorageAccess(true)  
79 - .databaseAccess(true)  
80 - .javaScriptAccess(true)  
81 - .zoomAccess(false)  
82 - .horizontalScrollBarAccess(false)  
83 - .verticalScrollBarAccess(false)  
84 - .onHttpErrorReceive((event) => {  
85 - //TODO 页面加载不成功的时候处理  
86 - Logger.info(TAG, 'onHttpErrorReceive event.request.getRequestUrl:' + event?.request.getRequestUrl());  
87 - Logger.info(TAG, 'onHttpErrorReceive event.response.getResponseCode:' + event?.response.getResponseCode());  
88 - })  
89 - .padding({bottom:this.contentID === "2" ? "40lpx" : 0 })  
90 - }  
91 } 97 }
92 } 98 }
@@ -12,6 +12,8 @@ import { TrackingPageBrowse, TrackConstants, TrackingButton } from 'wdTracking/I @@ -12,6 +12,8 @@ import { TrackingPageBrowse, TrackConstants, TrackingButton } from 'wdTracking/I
12 @Entry 12 @Entry
13 @Component 13 @Component
14 struct ModifyPasswordPage { 14 struct ModifyPasswordPage {
  15 + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
  16 + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
15 password_old: string = ''; 17 password_old: string = '';
16 password_new: string = ''; 18 password_new: string = '';
17 password_new_repeat: string = ''; 19 password_new_repeat: string = '';
@@ -64,9 +66,13 @@ struct ModifyPasswordPage { @@ -64,9 +66,13 @@ struct ModifyPasswordPage {
64 66
65 build() { 67 build() {
66 Column(){ 68 Column(){
67 - this.TitleBackComponent('')  
68 - this.ModifyPasswordLayout()  
69 - } 69 + Column(){
  70 + this.TitleBackComponent('')
  71 + this.ModifyPasswordLayout()
  72 + }
  73 + }.width("100%")
  74 + .height("100%")
  75 + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
70 76
71 } 77 }
72 78
@@ -2,7 +2,7 @@ import ArrayList from '@ohos.util.ArrayList'; @@ -2,7 +2,7 @@ import ArrayList from '@ohos.util.ArrayList';
2 import { Params } from '../../../../../../../commons/wdRouter/oh_modules/wdBean/Index'; 2 import { Params } from '../../../../../../../commons/wdRouter/oh_modules/wdBean/Index';
3 import router from '@ohos.router'; 3 import router from '@ohos.router';
4 import { LoginViewModel } from './LoginViewModel'; 4 import { LoginViewModel } from './LoginViewModel';
5 -import { CustomToast, DateTimeUtils, Logger, SPHelper, ToastUtils } from 'wdKit'; 5 +import { BreakpointSystem, CustomToast, DateTimeUtils, Logger, SPHelper, ToastUtils } from 'wdKit';
6 import { 6 import {
7 SpConstants 7 SpConstants
8 } from '../../../../../../../commons/wdNetwork/oh_modules/wdConstant/src/main/ets/constants/SpConstants' 8 } from '../../../../../../../commons/wdNetwork/oh_modules/wdConstant/src/main/ets/constants/SpConstants'
@@ -74,6 +74,19 @@ export struct SettingPasswordPage { @@ -74,6 +74,19 @@ export struct SettingPasswordPage {
74 pageHideResetTime:number = 0; 74 pageHideResetTime:number = 0;
75 pageShowSetTime:number = 0; 75 pageShowSetTime:number = 0;
76 pageHideSetTime:number = 0; 76 pageHideSetTime:number = 0;
  77 + @StorageProp('currentBreakpoint') @Watch("currentChanged")currentBreakpoint: string = 'sm';
  78 + private breakpointSystem = new BreakpointSystem();
  79 + @State percent:number = 1
  80 + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
  81 + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
  82 +
  83 + currentChanged(){
  84 + if(this.currentBreakpoint == "md" || this.currentBreakpoint == "lg"){
  85 + this.percent = 0.7
  86 + }else {
  87 + this.percent = 1
  88 + }
  89 + }
77 90
78 onPageShow(): void { 91 onPageShow(): void {
79 if (this.pageType === 0){//重置密码 92 if (this.pageType === 0){//重置密码
@@ -83,6 +96,10 @@ export struct SettingPasswordPage { @@ -83,6 +96,10 @@ export struct SettingPasswordPage {
83 } 96 }
84 } 97 }
85 98
  99 + calcHeight(value:number): number{
  100 + return value * this.percent
  101 + }
  102 +
86 onPageHide(): void { 103 onPageHide(): void {
87 if (this.pageType === 0){ 104 if (this.pageType === 0){
88 this.pageHideResetTime = DateTimeUtils.getTimeStamp() 105 this.pageHideResetTime = DateTimeUtils.getTimeStamp()
@@ -104,7 +121,13 @@ export struct SettingPasswordPage { @@ -104,7 +121,13 @@ export struct SettingPasswordPage {
104 } 121 }
105 } 122 }
106 123
  124 + aboutToDisappear(): void {
  125 + this.breakpointSystem.unregister();
  126 + }
  127 +
107 aboutToAppear() { 128 aboutToAppear() {
  129 + this.breakpointSystem.register();
  130 + this.currentChanged()
108 let params:SettingPasswordParams = router.getParams() as SettingPasswordParams; 131 let params:SettingPasswordParams = router.getParams() as SettingPasswordParams;
109 this.pageId = parseInt(params.pageID); 132 this.pageId = parseInt(params.pageID);
110 this.getPageListData(this.pageId) 133 this.getPageListData(this.pageId)
@@ -147,10 +170,48 @@ export struct SettingPasswordPage { @@ -147,10 +170,48 @@ export struct SettingPasswordPage {
147 } 170 }
148 171
149 build() { 172 build() {
150 - Navigation() {  
151 - this.settingList() //滑动区域  
152 - }.titleMode(NavigationTitleMode.Mini)  
153 - .title('') 173 + Column(){
  174 + Column(){
  175 + this.TitleBackComponent('')
  176 + this.settingList() //滑动区域
  177 + }
  178 + }.width("100%")
  179 + .height("100%")
  180 + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
  181 +
  182 + }
  183 +
  184 + @Builder TitleBackComponent(title:string){
  185 + RelativeContainer() {
  186 + Text(title)
  187 + .fontColor('#FF333333')
  188 + .fontSize(`${this.calcHeight(18)}`)
  189 + .textAlign(TextAlign.Center)
  190 + .height(`${this.calcHeight(44)}`)
  191 + .alignRules({
  192 + top: { anchor: "__container__", align: VerticalAlign.Top },
  193 + left: { anchor: "__container__", align: HorizontalAlign.Start },
  194 + right: { anchor: "__container__", align: HorizontalAlign.End },
  195 +
  196 + })
  197 + .id('titleContent')
  198 + Image($r("app.media.login_back_icon"))
  199 + .objectFit(ImageFit.Auto)
  200 + .height(`${this.calcHeight(24)}`)
  201 + .width(`${this.calcHeight(24)}`)
  202 + .margin({
  203 + left: `${this.calcHeight(16)}`, top: `${this.calcHeight(8)}`
  204 + })
  205 + .alignRules({
  206 + top: { anchor: "__container__", align: VerticalAlign.Top },
  207 + left: { anchor: "__container__", align: HorizontalAlign.Start },
  208 + })
  209 + .onClick(() => {
  210 + router.back()
  211 + })
  212 + .id('backImage')
  213 +
  214 + }.height(`${this.calcHeight(44)}`)
154 } 215 }
155 216
156 // 页面布局 217 // 页面布局
@@ -176,7 +237,7 @@ export struct SettingPasswordPage { @@ -176,7 +237,7 @@ export struct SettingPasswordPage {
176 }) 237 })
177 } 238 }
178 }.width('100%') 239 }.width('100%')
179 - .padding({ left:"31lpx",right:"31lpx",top:"131lpx" }) 240 + .padding({ left:`${this.calcHeight(31)}lpx`,right:`${this.calcHeight(31)}lpx`,top:`${this.calcHeight(131)}lpx` })
180 .height('100%') 241 .height('100%')
181 } 242 }
182 243
@@ -185,10 +246,10 @@ export struct SettingPasswordPage { @@ -185,10 +246,10 @@ export struct SettingPasswordPage {
185 // 标题 246 // 标题
186 @Builder getTitleCell(item: AccoutPageDataModel, alignTitle: HorizontalAlign) { 247 @Builder getTitleCell(item: AccoutPageDataModel, alignTitle: HorizontalAlign) {
187 Column() { 248 Column() {
188 - Text(item.compTitle).fontWeight(FontWeight.Bold).fontSize(20).maxLines(1) 249 + Text(item.compTitle).fontWeight(FontWeight.Bold).fontSize(`${this.calcHeight(20)}`).maxLines(1)
189 } 250 }
190 .width('100%') 251 .width('100%')
191 - .height('75lpx') 252 + .height(`${this.calcHeight(75)}lpx`)
192 .alignItems(alignTitle) 253 .alignItems(alignTitle)
193 } 254 }
194 255
@@ -210,12 +271,12 @@ export struct SettingPasswordPage { @@ -210,12 +271,12 @@ export struct SettingPasswordPage {
210 }) 271 })
211 } 272 }
212 .alignItems(VerticalAlign.Center) 273 .alignItems(VerticalAlign.Center)
213 - .height('80lpx') 274 + .height(`${this.calcHeight(80)}lpx`)
214 .backgroundColor('#f5f5f5') 275 .backgroundColor('#f5f5f5')
215 - .borderRadius('4vp') 276 + .borderRadius(`${this.calcHeight(4)}`)
216 } 277 }
217 .width('100%') 278 .width('100%')
218 - .height('110lpx') 279 + .height(`${this.calcHeight(110)}lpx`)
219 .backgroundColor(0xffffff0) 280 .backgroundColor(0xffffff0)
220 .alignItems(VerticalAlign.Center) 281 .alignItems(VerticalAlign.Center)
221 } 282 }
@@ -235,12 +296,12 @@ export struct SettingPasswordPage { @@ -235,12 +296,12 @@ export struct SettingPasswordPage {
235 }) 296 })
236 } 297 }
237 .alignItems(VerticalAlign.Center) 298 .alignItems(VerticalAlign.Center)
238 - .height('80lpx') 299 + .height(`${this.calcHeight(80)}lpx`)
239 .backgroundColor('#f5f5f5') 300 .backgroundColor('#f5f5f5')
240 - .borderRadius('4vp') 301 + .borderRadius(`${this.calcHeight(4)}`)
241 } 302 }
242 .width('100%') 303 .width('100%')
243 - .height('110lpx') 304 + .height(`${this.calcHeight(110)}lpx`)
244 .backgroundColor(0xffffff0) 305 .backgroundColor(0xffffff0)
245 .alignItems(VerticalAlign.Center) 306 .alignItems(VerticalAlign.Center)
246 } 307 }
@@ -249,7 +310,7 @@ export struct SettingPasswordPage { @@ -249,7 +310,7 @@ export struct SettingPasswordPage {
249 @Builder getCodeCell(item: AccoutPageDataModel) { 310 @Builder getCodeCell(item: AccoutPageDataModel) {
250 Row() { 311 Row() {
251 Stack() { 312 Stack() {
252 - Image($r('app.media.get_code_bg')).width('100%').borderRadius('4vp') 313 + Image($r('app.media.get_code_bg')).width('100%').borderRadius(`${this.calcHeight(4)}`)
253 Row() { 314 Row() {
254 TextInput({ placeholder: item.inputPlacholder }) 315 TextInput({ placeholder: item.inputPlacholder })
255 .placeholderColor("#CCCCCC") 316 .placeholderColor("#CCCCCC")
@@ -264,10 +325,10 @@ export struct SettingPasswordPage { @@ -264,10 +325,10 @@ export struct SettingPasswordPage {
264 .fontColor('#da3e22') 325 .fontColor('#da3e22')
265 } 326 }
266 .width('100%') 327 .width('100%')
267 - }.height('80lpx') 328 + }.height(`${this.calcHeight(80)}lpx`)
268 } 329 }
269 .width('100%') 330 .width('100%')
270 - .height('110lpx') 331 + .height(`${this.calcHeight(110)}lpx`)
271 .backgroundColor(0xffffff0) 332 .backgroundColor(0xffffff0)
272 .alignItems(VerticalAlign.Center) 333 .alignItems(VerticalAlign.Center)
273 } 334 }
@@ -275,7 +336,7 @@ export struct SettingPasswordPage { @@ -275,7 +336,7 @@ export struct SettingPasswordPage {
275 // desc 336 // desc
276 @Builder getDescCell(item: AccoutPageDataModel, alignTitle: HorizontalAlign) { 337 @Builder getDescCell(item: AccoutPageDataModel, alignTitle: HorizontalAlign) {
277 Column() { 338 Column() {
278 - Text(item.compDesc).fontSize(12).maxLines(3).fontColor(0x999999).padding({top:'10lpx'}) 339 + Text(item.compDesc).fontSize(`${this.calcHeight(12)}`).maxLines(3).fontColor(0x999999).padding({top:`${this.calcHeight(10)}lpx`})
279 .onClick(()=>{ 340 .onClick(()=>{
280 if (item.compDesc == '忘记密码') { 341 if (item.compDesc == '忘记密码') {
281 this.showToastTip('密码不符合密码规范') 342 this.showToastTip('密码不符合密码规范')
@@ -283,7 +344,7 @@ export struct SettingPasswordPage { @@ -283,7 +344,7 @@ export struct SettingPasswordPage {
283 }) 344 })
284 } 345 }
285 .width('100%') 346 .width('100%')
286 - .height('85lpx') 347 + .height(`${this.calcHeight(85)}lpx`)
287 .alignItems(alignTitle) 348 .alignItems(alignTitle)
288 } 349 }
289 350
@@ -293,29 +354,29 @@ export struct SettingPasswordPage { @@ -293,29 +354,29 @@ export struct SettingPasswordPage {
293 Text(item.compButtonTitle) 354 Text(item.compButtonTitle)
294 .layoutWeight(1) 355 .layoutWeight(1)
295 .fontColor("#FFFFFF") 356 .fontColor("#FFFFFF")
296 - .borderRadius(4)  
297 - .fontSize(18) 357 + .borderRadius(`${this.calcHeight(4)}`)
  358 + .fontSize(`${this.calcHeight(18)}`)
298 .textAlign(TextAlign.Center) 359 .textAlign(TextAlign.Center)
299 .fontWeight(FontWeight.Medium) 360 .fontWeight(FontWeight.Medium)
300 - .margin({ top: 26 })  
301 - .height(44) 361 + .margin({ top: `${this.calcHeight(26)}` })
  362 + .height(`${this.calcHeight(44)}`)
302 .backgroundColor("#ED2800") 363 .backgroundColor("#ED2800")
303 .enabled(this.btnStatus ? true : false) 364 .enabled(this.btnStatus ? true : false)
304 .opacity(this.btnStatus ? 1: 0.6) 365 .opacity(this.btnStatus ? 1: 0.6)
305 .onClick(() => { 366 .onClick(() => {
306 this.buttonClick() 367 this.buttonClick()
307 }) 368 })
308 - }.padding({top:'25lpx'}) 369 + }.padding({top:`${this.calcHeight(25)}lpx`})
309 .width('100%') 370 .width('100%')
310 } 371 }
311 372
312 // 标题 373 // 标题
313 @Builder getLogoCell(item: AccoutPageDataModel) { 374 @Builder getLogoCell(item: AccoutPageDataModel) {
314 Column() { 375 Column() {
315 - Image(item.compLogo).height('150lpx').width('150lpx') 376 + Image(item.compLogo).height(`${this.calcHeight(150)}lpx`).width(`${this.calcHeight(150)}lpx`)
316 } 377 }
317 .width('100%') 378 .width('100%')
318 - .height('200lpx') 379 + .height(`${this.calcHeight(200)}lpx`)
319 } 380 }
320 381
321 /***************************** 事件处理 ******************************************/ 382 /***************************** 事件处理 ******************************************/
@@ -24,6 +24,8 @@ struct VerifyPhoneNumberPage { @@ -24,6 +24,8 @@ struct VerifyPhoneNumberPage {
24 isFirst:boolean=true//是否第一次获取验证码 24 isFirst:boolean=true//是否第一次获取验证码
25 pageShowTime:number = 0; 25 pageShowTime:number = 0;
26 pageHideTime:number = 0; 26 pageHideTime:number = 0;
  27 + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
  28 + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
27 29
28 onCodeSend() { 30 onCodeSend() {
29 if (this.isCodeSend) { 31 if (this.isCodeSend) {
@@ -60,101 +62,105 @@ struct VerifyPhoneNumberPage { @@ -60,101 +62,105 @@ struct VerifyPhoneNumberPage {
60 62
61 63
62 build() { 64 build() {
63 - Column() {  
64 - Image($r('app.media.login_back_icon')).width(24).height(24).margin({ left: 15, top: 10 }).onClick(() => {  
65 - router.back()  
66 - })  
67 -  
68 - Text(this.pageTitle).fontSize(22).fontColor('#333333').fontWeight(FontWeight.Bold).margin({ left: 25, top: 112 })  
69 - 65 + Column(){
70 Column() { 66 Column() {
71 - TextInput({ text: this.securityPhone(this.phoneContent) })  
72 - .placeholderColor("#CCCCCC")  
73 - .fontSize(16)  
74 - .height(48)  
75 - .maxLength(11)  
76 - .margin({ top: 36 })  
77 - .backgroundColor("#F5F5F5")  
78 - .borderRadius(4)  
79 - .enabled(false)  
80 - .type(InputType.PhoneNumber)  
81 - .onChange((content) => {  
82 - this.phoneContent = content  
83 - this.isSubmit = (this.phoneContent.length >= 11 && this.codeContent.length >= 4)  
84 - if (content.length >= 11) {  
85 - this.codeBtnState = true  
86 - } else {  
87 - this.codeBtnState = false  
88 - }  
89 - }) 67 + Image($r('app.media.login_back_icon')).width(24).height(24).margin({ left: 15, top: 10 }).onClick(() => {
  68 + router.back()
  69 + })
90 70
91 - Row() {  
92 - TextInput({ text: this.codeContent,placeholder: "验证码" }) 71 + Text(this.pageTitle).fontSize(22).fontColor('#333333').fontWeight(FontWeight.Bold).margin({ left: 25, top: 112 })
  72 +
  73 + Column() {
  74 + TextInput({ text: this.securityPhone(this.phoneContent) })
93 .placeholderColor("#CCCCCC") 75 .placeholderColor("#CCCCCC")
94 - .layoutWeight(1)  
95 .fontSize(16) 76 .fontSize(16)
96 .height(48) 77 .height(48)
97 - .type(InputType.Number)  
98 - .fontColor("#222222")  
99 - .backgroundColor("#00000000")  
100 - .borderRadius({ topLeft: 4, bottomLeft: 4 })  
101 - .onChange((value) => {  
102 - this.codeContent = value 78 + .maxLength(11)
  79 + .margin({ top: 36 })
  80 + .backgroundColor("#F5F5F5")
  81 + .borderRadius(4)
  82 + .enabled(false)
  83 + .type(InputType.PhoneNumber)
  84 + .onChange((content) => {
  85 + this.phoneContent = content
103 this.isSubmit = (this.phoneContent.length >= 11 && this.codeContent.length >= 4) 86 this.isSubmit = (this.phoneContent.length >= 11 && this.codeContent.length >= 4)
104 - })  
105 -  
106 - Text(this.codeStateSuccess ? this.timeCount + "s" : this.isFirst?"发送验证码":'重新获取')  
107 - .fontColor(this.codeBtnState?'#ED2800':'#80ED2800')  
108 - .width(110)  
109 - .fontSize(14)  
110 - .fontWeight( FontWeight.Bold)  
111 - .height(48)  
112 - .textAlign(TextAlign.Center)  
113 - .enabled(this.codeStateSuccess?false:true)  
114 - .onClick(() => {  
115 - if (this.phoneContent.length < 11) {  
116 - return 87 + if (content.length >= 11) {
  88 + this.codeBtnState = true
  89 + } else {
  90 + this.codeBtnState = false
117 } 91 }
118 -  
119 - let currentTime = DateTimeUtils.getTimeStamp()  
120 - if (currentTime - this.lastTime < 500) {  
121 - return  
122 - }  
123 - this.lastTime = currentTime;  
124 - this.isCodeSend = true  
125 -  
126 }) 92 })
127 93
128 -  
129 - }.margin({ top: 12 })  
130 - .height(48)  
131 - .alignItems(VerticalAlign.Center)  
132 - .justifyContent(FlexAlign.Start)  
133 - .backgroundImage($r('app.media.code_login_bg'))  
134 - .backgroundImageSize({width:'100%',height:48}) 94 + Row() {
  95 + TextInput({ text: this.codeContent,placeholder: "验证码" })
  96 + .placeholderColor("#CCCCCC")
  97 + .layoutWeight(1)
  98 + .fontSize(16)
  99 + .height(48)
  100 + .type(InputType.Number)
  101 + .fontColor("#222222")
  102 + .backgroundColor("#00000000")
  103 + .borderRadius({ topLeft: 4, bottomLeft: 4 })
  104 + .onChange((value) => {
  105 + this.codeContent = value
  106 + this.isSubmit = (this.phoneContent.length >= 11 && this.codeContent.length >= 4)
  107 + })
  108 +
  109 + Text(this.codeStateSuccess ? this.timeCount + "s" : this.isFirst?"发送验证码":'重新获取')
  110 + .fontColor(this.codeBtnState?'#ED2800':'#80ED2800')
  111 + .width(110)
  112 + .fontSize(14)
  113 + .fontWeight( FontWeight.Bold)
  114 + .height(48)
  115 + .textAlign(TextAlign.Center)
  116 + .enabled(this.codeStateSuccess?false:true)
  117 + .onClick(() => {
  118 + if (this.phoneContent.length < 11) {
  119 + return
  120 + }
  121 +
  122 + let currentTime = DateTimeUtils.getTimeStamp()
  123 + if (currentTime - this.lastTime < 500) {
  124 + return
  125 + }
  126 + this.lastTime = currentTime;
  127 + this.isCodeSend = true
  128 +
  129 + })
  130 +
  131 +
  132 + }.margin({ top: 12 })
  133 + .height(48)
  134 + .alignItems(VerticalAlign.Center)
  135 + .justifyContent(FlexAlign.Start)
  136 + .backgroundImage($r('app.media.code_login_bg'))
  137 + .backgroundImageSize({width:'100%',height:48})
135 138
136 139
137 140
138 - }.width('100%').padding({ left: 25, right: 25 }) 141 + }.width('100%').padding({ left: 25, right: 25 })
139 142
140 - Row() {  
141 - Text("确认")  
142 - .layoutWeight(1)  
143 - .fontColor(this.isSubmit ?"#FFFFFFFF":"#66FFFFFF")  
144 - .borderRadius(4)  
145 - .fontSize(18)  
146 - .textAlign(TextAlign.Center)  
147 - .fontWeight(FontWeight.Medium)  
148 - .margin({ top: 26 })  
149 - .height(44)  
150 - .backgroundColor(this.isSubmit ?"#ED2800":"#99ED2800")  
151 - .enabled(this.isSubmit ? true : false)  
152 - .onClick(() => {  
153 - this.checkVerifyCode()  
154 - })  
155 - }.padding({ left: 25, right: 25 }).width('100%') 143 + Row() {
  144 + Text("确认")
  145 + .layoutWeight(1)
  146 + .fontColor(this.isSubmit ?"#FFFFFFFF":"#66FFFFFF")
  147 + .borderRadius(4)
  148 + .fontSize(18)
  149 + .textAlign(TextAlign.Center)
  150 + .fontWeight(FontWeight.Medium)
  151 + .margin({ top: 26 })
  152 + .height(44)
  153 + .backgroundColor(this.isSubmit ?"#ED2800":"#99ED2800")
  154 + .enabled(this.isSubmit ? true : false)
  155 + .onClick(() => {
  156 + this.checkVerifyCode()
  157 + })
  158 + }.padding({ left: 25, right: 25 }).width('100%')
156 159
157 - }.width('100%').height('100%').alignItems(HorizontalAlign.Start) 160 + }.width('100%').height('100%').alignItems(HorizontalAlign.Start)
  161 + }.width("100%")
  162 + .height("100%")
  163 + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
158 } 164 }
159 165
160 //发送验证码 166 //发送验证码
1 { 1 {
2 "src": [ 2 "src": [
3 - "pages/Index",  
4 "pages/login/LoginPage", 3 "pages/login/LoginPage",
5 "pages/login/ForgetPasswordPage", 4 "pages/login/ForgetPasswordPage",
6 "pages/login/LoginProtocolWebview", 5 "pages/login/LoginProtocolWebview",
@@ -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)
@@ -32,6 +32,8 @@ export struct VideoChannelPage { @@ -32,6 +32,8 @@ export struct VideoChannelPage {
32 @State indicatorWidth: number = 0 32 @State indicatorWidth: number = 0
33 // 传递给page的自动刷新通知 33 // 传递给page的自动刷新通知
34 @State autoRefresh2Page: number = 0 34 @State autoRefresh2Page: number = 0
  35 + @Provide showComment: boolean = false
  36 + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
35 aboutToAppear(): void { 37 aboutToAppear(): void {
36 this.setBarBackgroundColor() 38 this.setBarBackgroundColor()
37 console.log(TAG, 'aboutToAppear') 39 console.log(TAG, 'aboutToAppear')
@@ -70,7 +72,6 @@ export struct VideoChannelPage { @@ -70,7 +72,6 @@ export struct VideoChannelPage {
70 } 72 }
71 .width('100%') 73 .width('100%')
72 .height('100%') 74 .height('100%')
73 - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])  
74 } 75 }
75 76
76 @Builder 77 @Builder
@@ -150,7 +151,9 @@ export struct VideoChannelPage { @@ -150,7 +151,9 @@ export struct VideoChannelPage {
150 } 151 }
151 .zIndex(20) 152 .zIndex(20)
152 .height($r('app.float.top_tab_bar_height_common')) 153 .height($r('app.float.top_tab_bar_height_common'))
153 - .margin({ top: 10 }) 154 + .margin({
  155 + top: px2vp(this.topSafeHeight)
  156 + })
154 .visibility(this.displayDirection === DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None) 157 .visibility(this.displayDirection === DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None)
155 158
156 } 159 }
@@ -179,7 +182,7 @@ export struct VideoChannelPage { @@ -179,7 +182,7 @@ export struct VideoChannelPage {
179 channelId: item.channelId + '', 182 channelId: item.channelId + '',
180 autoRefresh: this.autoRefresh 183 autoRefresh: this.autoRefresh
181 }) 184 })
182 - .padding({ top: 55 }) 185 + .padding({ top: px2vp(this.topSafeHeight) + 55 })
183 .backgroundColor(Color.White) 186 .backgroundColor(Color.White)
184 } 187 }
185 }, (item: TopNavDTO) => item.channelId + '') 188 }, (item: TopNavDTO) => item.channelId + '')