wangliang_wd

feat:优化早晚报分享

... ... @@ -4,7 +4,7 @@ import {
PageInfoBean,
ContentDTO,
contentListParams,
InteractDataDTO
InteractDataDTO, TopicInfo
} from 'wdBean';
import { DateTimeUtils, Logger, SPHelper, WindowModel } from 'wdKit/Index';
import { PaperReaderSimpleDialog } from '../../dialog/PaperReaderDialog';
... ... @@ -61,6 +61,7 @@ export struct MorningEveningPaperComponent {
@Provide title: string = ''
@Provide subTitle: string = ''
@Provide audioTitle: string = ''
@Provide topicInfo: TopicInfo = {} as TopicInfo
@Provide isAudioPlaying: boolean = false
@Provide status: number = PlayerConstants.STATUS_START;
@Provide currentTime: string = "00:00";
... ... @@ -142,6 +143,7 @@ export struct MorningEveningPaperComponent {
viewColumInsightIntentShare(context,String(dailyPaperTopicPageId), this.pageInfoBean)
this.title = this.pageInfoBean?.topicInfo?.title
this.topicInfo = this.pageInfoBean?.topicInfo
let dateTime = DateTimeUtils.parseDate(this.pageInfoBean?.topicInfo?.topicDate ?? '', DateTimeUtils.PATTERN_DATE_HYPHEN)
const dateShow = new Date(dateTime)
this.subTitle = `${dateShow.getFullYear()}年\n${(dateShow.getMonth() + 1)}月${dateShow.getDate()}日`
... ... @@ -314,7 +316,7 @@ export struct MorningEveningPaperComponent {
@Builder
topPaperTitle(){
Column(){
PaperTitleComponent({topicInfo:this.pageInfoBean?.topicInfo})
PaperTitleComponent()
.margin({top:this.topSafeHeight})
}
.height(44+this.topSafeHeight)
... ...
... ... @@ -12,7 +12,7 @@ import { TrackConstants } from 'wdTracking/Index';
export struct PaperTitleComponent {
@Consume title?: string
@Consume subTitle?: string
topicInfo: TopicInfo = {} as TopicInfo
@Consume topicInfo: TopicInfo
aboutToAppear() {
}
... ... @@ -98,18 +98,18 @@ export struct PaperTitleComponent {
})
.margin({ right: 16 })
// Image($r('app.media.icon_share'))
// .height($r('app.float.top_arrow_size'))
// .width($r('app.float.top_arrow_size'))
// .alignRules({
// right: { anchor: "img_close", align: HorizontalAlign.Start },
// center: { anchor: "__container__", align: VerticalAlign.Center }
// })
// .id('img_share')
// .margin({ right: 16 })
// .onClick(() => {
// this.share()
// })
Image($r('app.media.icon_share'))
.height($r('app.float.top_arrow_size'))
.width($r('app.float.top_arrow_size'))
.alignRules({
right: { anchor: "img_close", align: HorizontalAlign.Start },
center: { anchor: "__container__", align: VerticalAlign.Center }
})
.id('img_share')
.margin({ right: 16 })
.onClick(() => {
this.share()
})
}
// .margin({ left: 14, right: 14 })
.height($r('app.float.top_bar_height'))
... ...