wangliang_wd

feat:调整早晚报,调整人民号展示

@@ -68,8 +68,8 @@ export struct MorningEveningPaperComponent { @@ -68,8 +68,8 @@ export struct MorningEveningPaperComponent {
68 @Provide progressVal: number = 0; 68 @Provide progressVal: number = 0;
69 @State mixedBgColor: string = '' 69 @State mixedBgColor: string = ''
70 // 顶部安全高度赋值 70 // 顶部安全高度赋值
71 - @State topSafeHeight: number = 0;  
72 - @State bottomSafeHeight: number = 0; 71 + @State topSafeHeight: number = px2vp(AppStorage.get<number>('topSafeHeight') || 0)
  72 + @State bottomSafeHeight: number = px2vp(AppStorage.get<number>('bottomSafeHeight') || 0)
73 @State isHasTopView: boolean = false; 73 @State isHasTopView: boolean = false;
74 @State scrollOffset: number = 0 74 @State scrollOffset: number = 0
75 @State currentStatus: number | string |undefined = 0; 75 @State currentStatus: number | string |undefined = 0;
@@ -121,11 +121,11 @@ export struct MorningEveningPaperComponent { @@ -121,11 +121,11 @@ export struct MorningEveningPaperComponent {
121 } 121 }
122 122
123 async aboutToAppear() { 123 async aboutToAppear() {
124 - let windowHight: window.Window = await window.getLastWindow(getContext(this)); 124 + // let windowHight: window.Window = await window.getLastWindow(getContext(this));
125 // await windowHight.setWindowLayoutFullScreen(true); 125 // await windowHight.setWindowLayoutFullScreen(true);
126 // WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', }) 126 // WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', })
127 - this.topSafeHeight = px2vp(windowHight.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).topRect.height)  
128 - this.bottomSafeHeight = px2vp(windowHight.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).bottomRect.height) 127 + // this.topSafeHeight = px2vp(windowHight.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).topRect.height)
  128 + // this.bottomSafeHeight = px2vp(windowHight.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).bottomRect.height)
129 129
130 const dailyPaperTopicPageId = await SPHelper.default.getSync('dailyPaperTopicPageId', "") as String 130 const dailyPaperTopicPageId = await SPHelper.default.getSync('dailyPaperTopicPageId', "") as String
131 console.info(TAG, `aboutToAppear = ` + dailyPaperTopicPageId) 131 console.info(TAG, `aboutToAppear = ` + dailyPaperTopicPageId)
@@ -331,13 +331,14 @@ export struct MorningEveningPaperComponent { @@ -331,13 +331,14 @@ export struct MorningEveningPaperComponent {
331 .height('100%') 331 .height('100%')
332 .objectFit(ImageFit.Contain) 332 .objectFit(ImageFit.Contain)
333 Image($r('app.media.icon_listen')) 333 Image($r('app.media.icon_listen'))
334 - .width(24)  
335 - .height(24)  
336 - .margin({ left: 10 }) 334 + .width(20)
  335 + .height(20)
  336 + .margin({ left: 20 })
337 .alignSelf(ItemAlign.Start) 337 .alignSelf(ItemAlign.Start)
338 338
339 Text(`${this.pageInfoBean.topicInfo?.topicPattern === 1 ? '早上好' : this.pageInfoBean.topicInfo?.topicPattern === 2 ? '中午好' : '晚上好'}, 请收听今日新闻播报`) 339 Text(`${this.pageInfoBean.topicInfo?.topicPattern === 1 ? '早上好' : this.pageInfoBean.topicInfo?.topicPattern === 2 ? '中午好' : '晚上好'}, 请收听今日新闻播报`)
340 .fontSize(14) 340 .fontSize(14)
  341 + .fontWeight(FontWeight.Medium)
341 .margin({ left: 50 }) 342 .margin({ left: 50 })
342 .fontColor(Color.Black) 343 .fontColor(Color.Black)
343 .maxLines(1) 344 .maxLines(1)
@@ -346,7 +346,9 @@ export struct SearchResultContentComponent { @@ -346,7 +346,9 @@ export struct SearchResultContentComponent {
346 }.offset({ left: this.listLeft }) 346 }.offset({ left: this.listLeft })
347 347
348 ListItem(){ 348 ListItem(){
349 - this.itemEnd() 349 + if (this.data_rmh.length === 10){
  350 + this.itemEnd()
  351 + }
350 }.height('100%') 352 }.height('100%')
351 .margin({left:'23lpx'}) 353 .margin({left:'23lpx'})
352 } 354 }
@@ -375,6 +377,8 @@ export struct SearchResultContentComponent { @@ -375,6 +377,8 @@ export struct SearchResultContentComponent {
375 console.info(TAG,'Pan start') 377 console.info(TAG,'Pan start')
376 }) 378 })
377 .onActionUpdate((event: GestureEvent) => { 379 .onActionUpdate((event: GestureEvent) => {
  380 + ///小于10个不展示滑动
  381 + if (this.data_rmh.length < 10) return;
378 if (event && this.isEnd) { 382 if (event && this.isEnd) {
379 // console.log('event.offsetX',event.offsetX) 383 // console.log('event.offsetX',event.offsetX)
380 this.listLeft = event.offsetX < -60 ? -60 : event.offsetX > 0 ? 0 : event.offsetX 384 this.listLeft = event.offsetX < -60 ? -60 : event.offsetX > 0 ? 0 : event.offsetX
@@ -384,6 +388,7 @@ export struct SearchResultContentComponent { @@ -384,6 +388,7 @@ export struct SearchResultContentComponent {
384 } 388 }
385 }) 389 })
386 .onActionEnd((event: GestureEvent) => { 390 .onActionEnd((event: GestureEvent) => {
  391 + if (this.data_rmh.length < 10) return;
387 console.info(TAG,'Pan end') 392 console.info(TAG,'Pan end')
388 this.listLeft = 0 393 this.listLeft = 0
389 // this.moreWidth = 20 394 // this.moreWidth = 20