Showing
2 changed files
with
9 additions
and
4 deletions
| @@ -3,6 +3,7 @@ import { ContentDetailDTO, TopicInfo } from 'wdBean/Index'; | @@ -3,6 +3,7 @@ import { ContentDetailDTO, TopicInfo } from 'wdBean/Index'; | ||
| 3 | import { ToastUtils } from 'wdKit'; | 3 | import { ToastUtils } from 'wdKit'; |
| 4 | import { WDShare } from 'wdShare/Index'; | 4 | import { WDShare } from 'wdShare/Index'; |
| 5 | import { TrackConstants } from 'wdTracking/Index'; | 5 | import { TrackConstants } from 'wdTracking/Index'; |
| 6 | +import font from '@ohos.font'; | ||
| 6 | 7 | ||
| 7 | /** | 8 | /** |
| 8 | * 早晚报页面标题bar | 9 | * 早晚报页面标题bar |
| @@ -14,6 +15,10 @@ export struct PaperTitleComponent { | @@ -14,6 +15,10 @@ export struct PaperTitleComponent { | ||
| 14 | @Consume subTitle?: string | 15 | @Consume subTitle?: string |
| 15 | @Consume topicInfo: TopicInfo | 16 | @Consume topicInfo: TopicInfo |
| 16 | aboutToAppear() { | 17 | aboutToAppear() { |
| 18 | + font.registerFont({ | ||
| 19 | + familyName: 'SourceHanSerifSC-Heavy', | ||
| 20 | + familySrc: $rawfile('font/SourceHanSerifSC-Heavy.ttf') | ||
| 21 | + }) | ||
| 17 | } | 22 | } |
| 18 | 23 | ||
| 19 | build() { | 24 | build() { |
| @@ -54,7 +59,7 @@ export struct PaperTitleComponent { | @@ -54,7 +59,7 @@ export struct PaperTitleComponent { | ||
| 54 | .margin({ left: 10 }) | 59 | .margin({ left: 10 }) |
| 55 | .fontSize(22) | 60 | .fontSize(22) |
| 56 | .fontColor($r('app.color.white')) | 61 | .fontColor($r('app.color.white')) |
| 57 | - .fontFamily('Source Han Serif CN') | 62 | + .fontFamily('SourceHanSerifSC-Heavy') |
| 58 | .maxLines(1) | 63 | .maxLines(1) |
| 59 | 64 | ||
| 60 | 65 | ||
| @@ -125,7 +130,7 @@ export struct PaperTitleComponent { | @@ -125,7 +130,7 @@ export struct PaperTitleComponent { | ||
| 125 | @Builder | 130 | @Builder |
| 126 | rightDecorateBuilder() { | 131 | rightDecorateBuilder() { |
| 127 | Row() | 132 | Row() |
| 128 | - .width('100vp') | 133 | + .width('80vp') |
| 129 | .height('18vp') | 134 | .height('18vp') |
| 130 | .clip(new Path({ | 135 | .clip(new Path({ |
| 131 | commands: `M${vp2px(9)} 0 H${vp2px(91)} V${vp2px(18)} L0 ${vp2px(18)} Z` | 136 | commands: `M${vp2px(9)} 0 H${vp2px(91)} V${vp2px(18)} L0 ${vp2px(18)} Z` |
| 1 | import { ContentDTO } from 'wdBean/Index' | 1 | import { ContentDTO } from 'wdBean/Index' |
| 2 | -import { StringUtils, UserDataLocal } from 'wdKit/Index' | 2 | +import { DateTimeUtils, StringUtils, UserDataLocal } from 'wdKit/Index' |
| 3 | import MinePageDatasModel from '../../../model/MinePageDatasModel' | 3 | import MinePageDatasModel from '../../../model/MinePageDatasModel' |
| 4 | import { CommentLikeOperationRequestItem } from '../../../viewmodel/CommentLikeOperationRequestItem' | 4 | import { CommentLikeOperationRequestItem } from '../../../viewmodel/CommentLikeOperationRequestItem' |
| 5 | import { CommentListItem } from '../../../viewmodel/CommentListItem' | 5 | import { CommentListItem } from '../../../viewmodel/CommentListItem' |
| @@ -45,7 +45,7 @@ export struct ChildCommentComponent { | @@ -45,7 +45,7 @@ export struct ChildCommentComponent { | ||
| 45 | .fontColor($r('app.color.color_222222')) | 45 | .fontColor($r('app.color.color_222222')) |
| 46 | .margin({ bottom: 1 }) | 46 | .margin({ bottom: 1 }) |
| 47 | .maxLines(1) | 47 | .maxLines(1) |
| 48 | - Text(`${this.data.createTime}`) | 48 | + Text(DateTimeUtils.getCommentTime(DateTimeUtils.getDateTimestamp(this.data.createTime))) |
| 49 | .fontColor($r('app.color.color_B0B0B0')) | 49 | .fontColor($r('app.color.color_B0B0B0')) |
| 50 | .fontSize(12) | 50 | .fontSize(12) |
| 51 | .lineHeight(16) | 51 | .lineHeight(16) |
-
Please register or login to post a comment