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
liyubing
2024-05-28 16:50:14 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
43e81edf6694c72f5057693760d3f5a24dca08e4
43e81edf
2 parents
abea91f6
9e40ac09
Merge remote-tracking branch 'origin/main'
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
109 additions
and
21 deletions
sight_harmony/features/wdComponent/src/main/ets/components/CardParser.ets
sight_harmony/features/wdComponent/src/main/ets/components/CompParser.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/RmhTitle.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card12Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card14Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card15Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card16Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card19Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card20Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card21Component.ets
sight_harmony/features/wdComponent/src/main/ets/utils/infomationCardClick.ets
sight_harmony/features/wdComponent/src/main/ets/components/CardParser.ets
View file @
43e81ed
...
...
@@ -32,12 +32,6 @@ export struct CardParser {
pageShowTime:number = 0;
pageHideTime:number = 0;
aboutToAppear(): void {
console.log('CardParser-contentDTO', JSON.stringify(this.contentDTO))
console.log('CardParser-compDTO', JSON.stringify(this.compDTO))
}
onPageShow() {
this.pageShowTime = DateTimeUtils.getTimeStamp()
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/CompParser.ets
View file @
43e81ed
...
...
@@ -42,6 +42,9 @@ export struct CompParser {
@State noneAudioItems: ContentDTO[] = [];
aboutToAppear(): void {
console.log('CompParser-compDTO', JSON.stringify(this.compDTO))
// 轮播图屏蔽音频类型稿件
if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) {
this.audioItems = this.compDTO.operDataList.filter(item => {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/RmhTitle.ets
View file @
43e81ed
...
...
@@ -5,7 +5,7 @@ import {
ContentDetailRequest,
postInteractAccentionOperateParams
} from 'wdDetailPlayApi/src/main/ets/request/ContentDetailRequest';
import { RmhInfoDTO } from 'wdBean'
import { RmhInfoDTO
, CompDTO, ContentDTO
} from 'wdBean'
import { CommonConstants } from 'wdConstant/Index';
import { DateTimeUtils, SPHelper, Logger, ToastUtils } from 'wdKit';
import { SpConstants } from 'wdConstant/Index'
...
...
@@ -14,9 +14,14 @@ import router from '@ohos.router'
import { postBatchAttentionStatusParams } from 'wdBean/Index';
import { MultiPictureDetailViewModel } from '../../viewmodel/MultiPictureDetailViewModel'
import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
import { InfomationCardClick } from '../../utils/infomationCardClick'
@Component
export struct RmhTitle {
@State compDTO: CompDTO = new CompDTO()
@State contentDTO: ContentDTO = new ContentDTO();
@State pageId: string = '';
@State pageName: string = '';
@Prop rmhInfo: RmhInfoDTO
@Prop publishTime: string | undefined
@State loadImg: boolean = false;
...
...
@@ -48,6 +53,16 @@ export struct RmhTitle {
}
ContentDetailRequest.postInteractAccentionOperate(params2).then(res => {
console.log('rmhTitle-data', JSON.stringify(res.data))
InfomationCardClick.track(
this.compDTO,
this.contentDTO,
this.pageId,
this.pageName,
'follow', // like, commentClick, follow
this.followStatus == '0' ? true : false,
)
if (this.followStatus == '1') {
this.followStatus = '0'
} else {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card12Component.ets
View file @
43e81ed
...
...
@@ -38,7 +38,16 @@ export struct Card12Component {
Column() {
// rmh信息
if (this.contentDTO.rmhInfo) {
RmhTitle({ rmhInfo: this.contentDTO.rmhInfo, publishTime: this.contentDTO.publishTime })
RmhTitle(
{
rmhInfo: this.contentDTO.rmhInfo,
publishTime: this.contentDTO.publishTime,
contentDTO: this.contentDTO,
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName
}
)
}
// 标题
if (this.contentDTO.newsTitle) {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card14Component.ets
View file @
43e81ed
...
...
@@ -41,7 +41,16 @@ export struct Card14Component {
Column() {
// rmh信息
if (this.contentDTO.rmhInfo) {
RmhTitle({ rmhInfo: this.contentDTO.rmhInfo, publishTime: this.contentDTO.publishTime })
RmhTitle(
{
rmhInfo: this.contentDTO.rmhInfo,
publishTime: this.contentDTO.publishTime,
contentDTO: this.contentDTO,
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName
}
)
}
// 左标题,右图
Flex({ direction: FlexDirection.Row, justifyContent: FlexAlign.SpaceBetween }) {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card15Component.ets
View file @
43e81ed
...
...
@@ -44,8 +44,16 @@ export struct Card15Component {
build() {
Column() {
// rmh信息
RmhTitle({ rmhInfo: this.contentDTO.rmhInfo, publishTime: this.contentDTO.publishTime })
//新闻标题
RmhTitle(
{
rmhInfo: this.contentDTO.rmhInfo,
publishTime: this.contentDTO.publishTime,
contentDTO: this.contentDTO,
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName
}
) //新闻标题
if (this.contentDTO.newsTitle) {
Text() {
if (this.titleMarked) {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card16Component.ets
View file @
43e81ed
...
...
@@ -46,7 +46,16 @@ export struct Card16Component {
Column() {
// rmh信息
if (this.contentDTO.rmhInfo) {
RmhTitle({ rmhInfo: this.contentDTO.rmhInfo, publishTime: this.contentDTO.publishTime })
RmhTitle(
{
rmhInfo: this.contentDTO.rmhInfo,
publishTime: this.contentDTO.publishTime,
contentDTO: this.contentDTO,
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName
}
)
}
// 标题
if (this.contentDTO.newsTitle) {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card19Component.ets
View file @
43e81ed
...
...
@@ -38,8 +38,16 @@ export struct Card19Component {
build() {
Column() {
// rmh信息
RmhTitle({ rmhInfo: this.contentDTO.rmhInfo, publishTime: this.contentDTO.publishTime })
// 标题
RmhTitle(
{
rmhInfo: this.contentDTO.rmhInfo,
publishTime: this.contentDTO.publishTime,
contentDTO: this.contentDTO,
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName
}
) // 标题
if (this.contentDTO.newsTitle) {
Text() {
if (this.titleMarked) {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card20Component.ets
View file @
43e81ed
...
...
@@ -38,8 +38,16 @@ export struct Card20Component {
build() {
Column() {
// rmh信息
RmhTitle({ rmhInfo: this.contentDTO.rmhInfo, publishTime: this.contentDTO.publishTime })
// 标题
RmhTitle(
{
rmhInfo: this.contentDTO.rmhInfo,
publishTime: this.contentDTO.publishTime,
contentDTO: this.contentDTO,
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName
}
) // 标题
if (this.contentDTO.newsTitle) {
Text() {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card21Component.ets
View file @
43e81ed
...
...
@@ -40,8 +40,16 @@ export struct Card21Component {
build() {
Column() {
// 顶部 rmh信息
RmhTitle({ rmhInfo: this.contentDTO.rmhInfo, publishTime: this.contentDTO.publishTime })
// 中间内容
RmhTitle(
{
rmhInfo: this.contentDTO.rmhInfo,
publishTime: this.contentDTO.publishTime,
contentDTO: this.contentDTO,
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName
}
) // 中间内容
Grid() {
GridItem() {
Text() {
...
...
sight_harmony/features/wdComponent/src/main/ets/utils/infomationCardClick.ets
View file @
43e81ed
...
...
@@ -43,10 +43,19 @@ export class InfomationCardClick {
return summaryType;
}
public static track(compDTO: CompDTO, contentDTO: ContentDTO, pageId: string, pageName: string): void {
public static track(
compDTO: CompDTO,
contentDTO: ContentDTO,
pageId: string,
pageName: string,
action = 'detailPageShow', // like, commentClick, follow
bl = false,
followUserId = '',
followUserName = ''
): void {
try {
const extParams: ParamType = {
'action':
'detailPageShow'
,
'action':
action
,
'shareChannel': '',
'duration': 0,
'contentName': contentDTO.newsTitle,
...
...
@@ -87,7 +96,15 @@ export class InfomationCardClick {
extParams['saAuthorName'] = contentDTO.source;
}
console.log('InfomationCardClick-params:', JSON.stringify(extParams))
TrackingContent.common(TrackConstants.EventType.Click, pageId, pageName, extParams)
if (action === 'detailPageShow') {
TrackingContent.common(TrackConstants.EventType.Click, pageId, pageName, extParams);
} else if (action === 'like') {
TrackingContent.like(bl, pageId, pageName, extParams);
} else if (action === 'commentClick') {
TrackingContent.commentClick(pageId, pageName, extParams);
} else if (action === 'follow') {
TrackingContent.follow(bl, followUserId, followUserName, pageId, pageName, extParams)
}
} catch (err) {
console.log('InfomationCardClick-err', JSON.stringify(err))
}
...
...
Please
register
or
login
to post a comment