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-08-01 14:54:49 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7ad78501c293913aaa5c02004b76a1d03882e297
7ad78501
1 parent
c3076d10
feat:优化早晚报标题
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletions
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/MorningEveningPaperComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/MorningEveningPaperComponent.ets
View file @
7ad7850
...
...
@@ -137,7 +137,8 @@ export struct MorningEveningPaperComponent {
let pageInfoBean = await MorningEveningViewModel.getMorningEveningPageInfo("" + this.dailyPaperTopicPageId) //"25091"
this.pageInfoBean = pageInfoBean;
this.title = this.pageInfoBean?.topicInfo?.title
// this.title = this.pageInfoBean?.topicInfo?.title
this.setComponentTitle()
this.topicInfo = this.pageInfoBean?.topicInfo
let dateTime = DateTimeUtils.parseDate(this.pageInfoBean?.topicInfo?.topicDate ?? '', DateTimeUtils.PATTERN_DATE_HYPHEN)
const dateShow = new Date(dateTime)
...
...
@@ -230,6 +231,16 @@ export struct MorningEveningPaperComponent {
}
}
setComponentTitle() {
if (this.pageInfoBean.topicInfo.topicPattern === 1) {
this.title = '新闻早读'
}else if(this.pageInfoBean.topicInfo.topicPattern === 2){
this.title = '新闻午报'
}else {
this.title = '新闻夜读'
}
}
private async pickColor(imageSource: image.ImageSource | undefined) {
if (imageSource) {
const pixelMap: image.PixelMap = await imageNet2PixelMap(imageSource);
...
...
Please
register
or
login
to post a comment