Showing
3 changed files
with
9 additions
and
13 deletions
| @@ -7,7 +7,8 @@ import { CardSourceInfo } from '../cardCommon/CardSourceInfo'; | @@ -7,7 +7,8 @@ import { CardSourceInfo } from '../cardCommon/CardSourceInfo'; | ||
| 7 | import { Notes } from './notes'; | 7 | import { Notes } from './notes'; |
| 8 | import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; | 8 | import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; |
| 9 | // import { persistentStorage, hasClicked } from '../../utils/persistentStorage'; | 9 | // import { persistentStorage, hasClicked } from '../../utils/persistentStorage'; |
| 10 | - | 10 | +import { viewBlogInsightIntentShare, ActionMode } from '../../utils/InsightIntentShare' |
| 11 | +import { common } from '@kit.AbilityKit'; | ||
| 11 | const TAG: string = 'Card2Component'; | 12 | const TAG: string = 'Card2Component'; |
| 12 | 13 | ||
| 13 | /** | 14 | /** |
| @@ -104,6 +105,11 @@ export struct Card2Component { | @@ -104,6 +105,11 @@ export struct Card2Component { | ||
| 104 | this.clicked = true; | 105 | this.clicked = true; |
| 105 | // persistentStorage(this.contentDTO.objectId); | 106 | // persistentStorage(this.contentDTO.objectId); |
| 106 | ProcessUtils.processPage(this.contentDTO) | 107 | ProcessUtils.processPage(this.contentDTO) |
| 108 | + | ||
| 109 | + if (this.contentDTO?.channelId === '2001' || this.contentDTO?.channelId === '2002') { | ||
| 110 | + let context = getContext(this) as common.UIAbilityContext; | ||
| 111 | + viewBlogInsightIntentShare(context, this.contentDTO?.channelId, [this.compDTO], ActionMode.EXECUTED) | ||
| 112 | + } | ||
| 107 | }) | 113 | }) |
| 108 | } | 114 | } |
| 109 | } | 115 | } |
| @@ -78,10 +78,7 @@ export struct PageComponent { | @@ -78,10 +78,7 @@ export struct PageComponent { | ||
| 78 | ListItem() { | 78 | ListItem() { |
| 79 | Column() { | 79 | Column() { |
| 80 | CompParser({ pageModel: this.pageModel, compDTO: compDTO, compIndex: compIndex }); | 80 | CompParser({ pageModel: this.pageModel, compDTO: compDTO, compIndex: compIndex }); |
| 81 | - }.onClick(()=>{ | ||
| 82 | - this.viewBlogInsightIntentShare(compDTO) | ||
| 83 | - }) | ||
| 84 | - | 81 | + } |
| 85 | } | 82 | } |
| 86 | }, | 83 | }, |
| 87 | (compDTO: CompDTO, compIndex: number) => JSON.stringify(compDTO)) | 84 | (compDTO: CompDTO, compIndex: number) => JSON.stringify(compDTO)) |
| @@ -261,12 +258,5 @@ export struct PageComponent { | @@ -261,12 +258,5 @@ export struct PageComponent { | ||
| 261 | PageHelper.getInitData(this.pageModel, this.pageAdvModel) | 258 | PageHelper.getInitData(this.pageModel, this.pageAdvModel) |
| 262 | }, 100) | 259 | }, 100) |
| 263 | } | 260 | } |
| 264 | - | ||
| 265 | - viewBlogInsightIntentShare(compDTO:CompDTO){ | ||
| 266 | - if (this.channelId === '2001' || this.channelId === '2002') { | ||
| 267 | - let context = getContext(this) as common.UIAbilityContext; | ||
| 268 | - viewBlogInsightIntentShare(context, this.channelId, [compDTO], ActionMode.EXECUTED) | ||
| 269 | - } | ||
| 270 | - } | ||
| 271 | } | 261 | } |
| 272 | 262 |
| @@ -349,7 +349,7 @@ export class PageHelper { | @@ -349,7 +349,7 @@ export class PageHelper { | ||
| 349 | PageViewModel.getInteractData(compList).then((data: InteractDataDTO[]) => { | 349 | PageViewModel.getInteractData(compList).then((data: InteractDataDTO[]) => { |
| 350 | // 刷新,替换所有数据 | 350 | // 刷新,替换所有数据 |
| 351 | this.resetInteract(data, pageModel.compList) | 351 | this.resetInteract(data, pageModel.compList) |
| 352 | - if(pageModel?.channelId !== '2001' && pageModel?.channelId !== '2002'){ | 352 | + if(pageModel?.channelId === '2001' || pageModel?.channelId === '2002'){ |
| 353 | //早晚报意图上报 | 353 | //早晚报意图上报 |
| 354 | let context = getContext(this) as common.UIAbilityContext; | 354 | let context = getContext(this) as common.UIAbilityContext; |
| 355 | viewBlogInsightIntentShare(context, pageModel?.channelId, compList, ActionMode.EXPECTED) | 355 | viewBlogInsightIntentShare(context, pageModel?.channelId, compList, ActionMode.EXPECTED) |
-
Please register or login to post a comment