Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
wangliang_wd
2024-06-20 10:29:53 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d4580cda6c253ab86e258c2ef8fe477e912dddf1
d4580cda
1 parent
757cb0f8
feat:优化早晚报分享
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
15 deletions
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/MorningEveningPaperComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/PaperTitleComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/MorningEveningPaperComponent.ets
View file @
d4580cd
...
...
@@ -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)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/PaperTitleComponent.ets
View file @
d4580cd
...
...
@@ -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'))
...
...
Please
register
or
login
to post a comment