张善主

Merge remote-tracking branch 'origin/main'

@@ -26,6 +26,7 @@ import { common } from '@kit.AbilityKit'; @@ -26,6 +26,7 @@ import { common } from '@kit.AbilityKit';
26 import TrackingPageBrowseUtils from '../../utils/TrackingPageBrowseUtils' 26 import TrackingPageBrowseUtils from '../../utils/TrackingPageBrowseUtils'
27 import {TrackConstants,TrackParamConvert}from 'wdTracking/Index' 27 import {TrackConstants,TrackParamConvert}from 'wdTracking/Index'
28 import { ColorUtils } from '../../utils/ColorUtils'; 28 import { ColorUtils } from '../../utils/ColorUtils';
  29 +import { EmptyComponent,WDViewDefaultType } from '../view/EmptyComponent';
29 30
30 const TAG = 'MorningEveningPaperComponent'; 31 const TAG = 'MorningEveningPaperComponent';
31 32
@@ -37,6 +38,7 @@ export struct MorningEveningPaperComponent { @@ -37,6 +38,7 @@ export struct MorningEveningPaperComponent {
37 @State compListItem: CompList = {} as CompList 38 @State compListItem: CompList = {} as CompList
38 @Provide commentList: InteractDataDTO[] = [] 39 @Provide commentList: InteractDataDTO[] = []
39 @State audioPlayUrl: string = "" 40 @State audioPlayUrl: string = ""
  41 + @State isNoListContent:boolean = false;
40 // @Consume dailyPaperTopicPageId: number 42 // @Consume dailyPaperTopicPageId: number
41 // @Provide compListItem: CompList = {} as CompList 43 // @Provide compListItem: CompList = {} as CompList
42 // @State morningEveningPaperDTO: MorningEveningPaperDTO = { 44 // @State morningEveningPaperDTO: MorningEveningPaperDTO = {
@@ -172,6 +174,7 @@ export struct MorningEveningPaperComponent { @@ -172,6 +174,7 @@ export struct MorningEveningPaperComponent {
172 this.totalTime = DateFormatUtil.secondToTime(duration); 174 this.totalTime = DateFormatUtil.secondToTime(duration);
173 this.progressVal = Math.floor(position * 100 / duration); 175 this.progressVal = Math.floor(position * 100 / duration);
174 } 176 }
  177 + this.isNoListContent = this.compListItem && this.compListItem?.operDataList?.length > 0 ?false:true
175 } catch (exception) { 178 } catch (exception) {
176 179
177 } 180 }
@@ -264,6 +267,9 @@ export struct MorningEveningPaperComponent { @@ -264,6 +267,9 @@ export struct MorningEveningPaperComponent {
264 } 267 }
265 268
266 ListItem() { 269 ListItem() {
  270 + if(this.isNoListContent){
  271 + EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NoListContent})
  272 + }else {
267 SingleColumn999Component({ 273 SingleColumn999Component({
268 compListItem: this.compListItem, 274 compListItem: this.compListItem,
269 }) 275 })
@@ -272,6 +278,7 @@ export struct MorningEveningPaperComponent { @@ -272,6 +278,7 @@ export struct MorningEveningPaperComponent {
272 }) 278 })
273 } 279 }
274 } 280 }
  281 + }
275 // .height(`calc(100% - ${this.bottomSafeHeight + this.topSafeHeight + 'vp'})`) 282 // .height(`calc(100% - ${this.bottomSafeHeight + this.topSafeHeight + 'vp'})`)
276 .edgeEffect(EdgeEffect.None) // 必须设置列表为滑动到边缘无效果 283 .edgeEffect(EdgeEffect.None) // 必须设置列表为滑动到边缘无效果
277 .scrollBar(BarState.Off) 284 .scrollBar(BarState.Off)
@@ -152,7 +152,7 @@ export struct SingleColumn999Component { @@ -152,7 +152,7 @@ export struct SingleColumn999Component {
152 scrollBackward: NestedScrollMode.SELF_FIRST 152 scrollBackward: NestedScrollMode.SELF_FIRST
153 }) 153 })
154 } else { 154 } else {
155 - EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NoListContent}) 155 + // EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NoListContent})
156 } 156 }
157 } 157 }
158 158