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-04 16:38:02 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b03525dd90b3570d5e1d90a1ef8293c6bb66c1fa
b03525dd
1 parent
b1471afb
feat:增加早晚报已读状态
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletions
sight_harmony/features/wdComponent/src/main/ets/components/page/CardView.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/CardView.ets
View file @
b03525d
...
...
@@ -7,6 +7,7 @@ import { TrackConstants,
TrackingButton,
TrackingContent, TrackingPageBrowse, TrackParamConvert } from 'wdTracking/Index';
import { WDShare } from 'wdShare/Index';
import { hasClicked, persistentStorage } from '../../utils/persistentStorage';
const TAG: string = 'CardView';
...
...
@@ -393,6 +394,7 @@ export struct MasonryLayout01CardView {
export struct PaperSingleColumn999CardView {
private item: ContentDTO = new ContentDTO();
private index: number = -1;
@State isRead: boolean = false;//已读状态
@State interactData: InteractDataDTO = {} as InteractDataDTO;
@Consume @Watch('onChangeCommentList') commentList: InteractDataDTO[]
...
...
@@ -533,7 +535,7 @@ export struct PaperSingleColumn999CardView {
}
if (this.item?.newsSummary) {
Text(this.item?.newsSummary)
.fontColor(
'#6666666
')
.fontColor(
this.isRead ? 0x848484 : '#222222
')
.fontSize(14)
.padding({ top: 10 })
.alignSelf(ItemAlign.Start)
...
...
@@ -599,6 +601,8 @@ export struct PaperSingleColumn999CardView {
.margin({ bottom: 10, left: 12, right: 12 })
.borderRadius(4)
.onClick(() => {
this.isRead = true
persistentStorage(this.item.objectId);
ProcessUtils.processPage(this.item)
TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.SummaryType.MorningAndEveningNews,TrackConstants.SummaryType.MorningAndEveningNews,TrackParamConvert.program(this.item))
}).onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => {
...
...
@@ -610,6 +614,7 @@ export struct PaperSingleColumn999CardView {
aboutToAppear(): void {
this.onChangeCommentList()
this.isRead = hasClicked(this.item.objectId)
}
onChangeCommentList() {
...
...
Please
register
or
login
to post a comment