yuzhilin

feat:意图框架完成时

... ... @@ -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)
}
})
}
}
... ...
... ... @@ -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)
}
}
}
... ...
... ... @@ -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)
... ...