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
yuzhilin
2024-05-15 19:38:43 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d843929adf9637945487e662eaf735c3dea1fc78
d843929a
1 parent
f52dcda0
feat:意图框架完成时
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
13 deletions
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card2Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/PageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/viewmodel/PageHelper.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card2Component.ets
View file @
d843929
...
...
@@ -7,7 +7,8 @@ import { CardSourceInfo } from '../cardCommon/CardSourceInfo';
import { Notes } from './notes';
import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
// import { persistentStorage, hasClicked } from '../../utils/persistentStorage';
import { viewBlogInsightIntentShare, ActionMode } from '../../utils/InsightIntentShare'
import { common } from '@kit.AbilityKit';
const TAG: string = 'Card2Component';
/**
...
...
@@ -104,6 +105,11 @@ export struct Card2Component {
this.clicked = true;
// persistentStorage(this.contentDTO.objectId);
ProcessUtils.processPage(this.contentDTO)
if (this.contentDTO?.channelId === '2001' || this.contentDTO?.channelId === '2002') {
let context = getContext(this) as common.UIAbilityContext;
viewBlogInsightIntentShare(context, this.contentDTO?.channelId, [this.compDTO], ActionMode.EXECUTED)
}
})
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/PageComponent.ets
View file @
d843929
...
...
@@ -78,10 +78,7 @@ export struct PageComponent {
ListItem() {
Column() {
CompParser({ pageModel: this.pageModel, compDTO: compDTO, compIndex: compIndex });
}.onClick(()=>{
this.viewBlogInsightIntentShare(compDTO)
})
}
}
},
(compDTO: CompDTO, compIndex: number) => JSON.stringify(compDTO))
...
...
@@ -261,12 +258,5 @@ export struct PageComponent {
PageHelper.getInitData(this.pageModel, this.pageAdvModel)
}, 100)
}
viewBlogInsightIntentShare(compDTO:CompDTO){
if (this.channelId === '2001' || this.channelId === '2002') {
let context = getContext(this) as common.UIAbilityContext;
viewBlogInsightIntentShare(context, this.channelId, [compDTO], ActionMode.EXECUTED)
}
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/viewmodel/PageHelper.ets
View file @
d843929
...
...
@@ -349,7 +349,7 @@ export class PageHelper {
PageViewModel.getInteractData(compList).then((data: InteractDataDTO[]) => {
// 刷新,替换所有数据
this.resetInteract(data, pageModel.compList)
if(pageModel?.channelId
!== '2001' && pageModel?.channelId !
== '2002'){
if(pageModel?.channelId
=== '2001' || pageModel?.channelId =
== '2002'){
//早晚报意图上报
let context = getContext(this) as common.UIAbilityContext;
viewBlogInsightIntentShare(context, pageModel?.channelId, compList, ActionMode.EXPECTED)
...
...
Please
register
or
login
to post a comment