陈剑华

Merge remote-tracking branch 'origin/main'

@@ -84,7 +84,7 @@ export struct ENewspaperPageComponent { @@ -84,7 +84,7 @@ export struct ENewspaperPageComponent {
84 selectDate: this.selectDate, 84 selectDate: this.selectDate,
85 onDateChange: (date: RMCalendarBean) => { 85 onDateChange: (date: RMCalendarBean) => {
86 console.log("onDateChange-日历选择弹框", "date:", JSON.stringify(date)) 86 console.log("onDateChange-日历选择弹框", "date:", JSON.stringify(date))
87 - if (date.fullYear && date.month && date.date) { 87 + if (date?.fullYear && date?.month && date?.date) {
88 let month: number = date.month + 1 88 let month: number = date.month + 1
89 this.calendarDate = 89 this.calendarDate =
90 `${date.fullYear}-${month > 9 ? month : '0' + month}-${date.date > 9 ? date.date : '0' + date.date}` 90 `${date.fullYear}-${month > 9 ? month : '0' + month}-${date.date > 9 ? date.date : '0' + date.date}`
@@ -94,14 +94,16 @@ export struct ENewspaperPageComponent { @@ -94,14 +94,16 @@ export struct ENewspaperPageComponent {
94 new Date(date.fullYear ? date.fullYear : 0, date.month ? date.month : 0, date.date ? date.date : 0) 94 new Date(date.fullYear ? date.fullYear : 0, date.month ? date.month : 0, date.date ? date.date : 0)
95 } 95 }
96 //日历选择点击 96 //日历选择点击
97 - TrackingContent.clickWithEvent('date_selection_click', TrackConstants.PageName.NewsPaperPage,  
98 - TrackConstants.PageName.NewsPaperPage  
99 - , {  
100 - 'panelNumber': this.newspaperListBean?.list[this.swiperIndex].pageNum,  
101 - 'panelName': this.newspaperListBean?.list[this.swiperIndex].pageName,  
102 - 'currentPanelDate': this.selectDate.toDateString(),  
103 - 'currentNumber': this.swiperIndex,  
104 - }) 97 + if (this.newspaperListBean?.list) {
  98 + TrackingContent.clickWithEvent('date_selection_click', TrackConstants.PageName.NewsPaperPage,
  99 + TrackConstants.PageName.NewsPaperPage
  100 + , {
  101 + 'panelNumber': this.newspaperListBean?.list[this.swiperIndex].pageNum,
  102 + 'panelName': this.newspaperListBean?.list[this.swiperIndex].pageName,
  103 + 'currentPanelDate': this.selectDate.toDateString(),
  104 + 'currentNumber': this.swiperIndex,
  105 + })
  106 + }
105 } 107 }
106 }), 108 }),
107 alignment: DialogAlignment.Top, 109 alignment: DialogAlignment.Top,
@@ -22,7 +22,7 @@ export struct InteractMComponent { @@ -22,7 +22,7 @@ export struct InteractMComponent {
22 22
23 Column(){ 23 Column(){
24 Row(){ 24 Row(){
25 - Text(this.messageModel.InteractMsubM.userName) 25 + Text(this.messageModel.InteractMsubM?.userName)
26 .fontSize('14fp').fontColor('#222222') 26 .fontSize('14fp').fontColor('#222222')
27 27
28 Text(this.buildContentString()) 28 Text(this.buildContentString())
@@ -30,7 +30,7 @@ export struct InteractMComponent { @@ -30,7 +30,7 @@ export struct InteractMComponent {
30 .margin({left:5}) 30 .margin({left:5})
31 }.width('100%') 31 }.width('100%')
32 32
33 - Text(this.getPublishTime(this.messageModel.time,DateTimeUtils.getDateTimestamp(this.messageModel.time)+"")) 33 + Text(this.messageModel.time?this.getPublishTime(this.messageModel.time,DateTimeUtils.getDateTimestamp(this.messageModel.time)+""):'')
34 .margin({top:2}) 34 .margin({top:2})
35 .fontSize('12fp').fontColor('#B0B0B0').margin({top:10,bottom:10}) 35 .fontSize('12fp').fontColor('#B0B0B0').margin({top:10,bottom:10})
36 36
@@ -59,7 +59,7 @@ export struct InteractMComponent { @@ -59,7 +59,7 @@ export struct InteractMComponent {
59 Image($r('app.media.MessageOriginTextIcon')) 59 Image($r('app.media.MessageOriginTextIcon'))
60 .width('12') 60 .width('12')
61 .height('12') 61 .height('12')
62 - Text(this.messageModel.InteractMsubM.contentTitle) 62 + Text(this.messageModel.InteractMsubM?.contentTitle)
63 .fontSize('12fp') 63 .fontSize('12fp')
64 .fontColor('#666666') 64 .fontColor('#666666')
65 .maxLines(1) 65 .maxLines(1)
@@ -560,7 +560,7 @@ export struct PaperSingleColumn999CardView { @@ -560,7 +560,7 @@ export struct PaperSingleColumn999CardView {
560 Row() { 560 Row() {
561 Row() { 561 Row() {
562 562
563 - if (this.item.corner.length > 0){ 563 + if (this.item?.corner?.length > 0){
564 Text(this.item.corner) 564 Text(this.item.corner)
565 .fontSize(12) 565 .fontSize(12)
566 .fontColor('#ED2800') 566 .fontColor('#ED2800')
@@ -571,7 +571,7 @@ export struct PaperSingleColumn999CardView { @@ -571,7 +571,7 @@ export struct PaperSingleColumn999CardView {
571 Text(this.buildSourceString()) 571 Text(this.buildSourceString())
572 .fontSize(12) 572 .fontSize(12)
573 .fontColor('#B0B0B0') 573 .fontColor('#B0B0B0')
574 - .margin({ left: this.item.corner.length > 0?10:16 }) 574 + .margin({ left: this.item?.corner?.length > 0?10:16 })
575 575
576 ///不显示时间或者不显示评论 576 ///不显示时间或者不显示评论
577 if (this.getPublishTime().length > 0 || this.item.objectType != '2' && this.interactData && this.interactData.commentNum && Number(this.interactData.commentNum) > 0) { 577 if (this.getPublishTime().length > 0 || this.item.objectType != '2' && this.interactData && this.interactData.commentNum && Number(this.interactData.commentNum) > 0) {
@@ -60,9 +60,10 @@ export class LiveDetailPageLogic { @@ -60,9 +60,10 @@ export class LiveDetailPageLogic {
60 60
61 // 垫图资源 61 // 垫图资源
62 if (this.contentDetailData.liveInfo){ 62 if (this.contentDetailData.liveInfo){
63 -  
64 - if(this.contentDetailData.liveInfo.padImageUri.length > 0){  
65 - this.padImageUri =this.contentDetailData.liveInfo.padImageUri 63 + if(this.contentDetailData.liveInfo.padImageUri) {
  64 + if(this.contentDetailData.liveInfo.padImageUri.length > 0){
  65 + this.padImageUri =this.contentDetailData.liveInfo.padImageUri
  66 + }
66 } 67 }
67 //this.padImageUri = 'https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20240515/image/display/cdb84fe86b1440d58f3fc585841b928d.jpg' 68 //this.padImageUri = 'https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20240515/image/display/cdb84fe86b1440d58f3fc585841b928d.jpg'
68 69