Showing
31 changed files
with
181 additions
and
98 deletions
| @@ -203,6 +203,7 @@ export class ProcessUtils { | @@ -203,6 +203,7 @@ export class ProcessUtils { | ||
| 203 | relType: content?.relType, | 203 | relType: content?.relType, |
| 204 | relId: content?.relId, | 204 | relId: content?.relId, |
| 205 | channelId: content?.channelId, | 205 | channelId: content?.channelId, |
| 206 | + pageId: content?.pageId | ||
| 206 | } as ExtraDTO | 207 | } as ExtraDTO |
| 207 | } as Params, | 208 | } as Params, |
| 208 | }; | 209 | }; |
| @@ -10,6 +10,7 @@ export interface ExtraDTO extends ItemDTO { | @@ -10,6 +10,7 @@ export interface ExtraDTO extends ItemDTO { | ||
| 10 | topicId: string; | 10 | topicId: string; |
| 11 | channelId: string; | 11 | channelId: string; |
| 12 | compId: string; | 12 | compId: string; |
| 13 | + pageId: string; | ||
| 13 | sourcePage: string; | 14 | sourcePage: string; |
| 14 | relId: string; | 15 | relId: string; |
| 15 | relType: string; | 16 | relType: string; |
| @@ -25,5 +25,6 @@ export interface Params { | @@ -25,5 +25,6 @@ export interface Params { | ||
| 25 | creatorId?: string; //号主id | 25 | creatorId?: string; //号主id |
| 26 | videoUrl?: string; | 26 | videoUrl?: string; |
| 27 | videoCoverUrl?: string; | 27 | videoCoverUrl?: string; |
| 28 | + pageId?: string; | ||
| 28 | backVisibility?: boolean; //展示顶部返回栏 | 29 | backVisibility?: boolean; //展示顶部返回栏 |
| 29 | } | 30 | } |
| @@ -601,6 +601,8 @@ export struct DynamicDetailComponent { | @@ -601,6 +601,8 @@ export struct DynamicDetailComponent { | ||
| 601 | this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle || '') | 601 | this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle || '') |
| 602 | this.publishCommentModel.targetType = String(this.contentDetailData?.newsType || '') | 602 | this.publishCommentModel.targetType = String(this.contentDetailData?.newsType || '') |
| 603 | this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment || '') | 603 | this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment || '') |
| 604 | + this.publishCommentModel.pageId = TrackConstants.PageName.DynamicDetail | ||
| 605 | + this.publishCommentModel.pageName = TrackConstants.PageName.DynamicDetail | ||
| 604 | } | 606 | } |
| 605 | 607 | ||
| 606 | this.operationButtonList = ['comment', 'collect', 'share'] | 608 | this.operationButtonList = ['comment', 'collect', 'share'] |
| @@ -680,7 +682,7 @@ export struct DynamicDetailComponent { | @@ -680,7 +682,7 @@ export struct DynamicDetailComponent { | ||
| 680 | 682 | ||
| 681 | //创建跳转信息 | 683 | //创建跳转信息 |
| 682 | makeJumpInfo() { | 684 | makeJumpInfo() { |
| 683 | - this.mJumpInfo.pageId = 'dynamicDetailPage' | 685 | + this.mJumpInfo.pageId = TrackConstants.PageName.DynamicDetail |
| 684 | this.mJumpInfo.objectId = this.contentDetailData.newsId + "" | 686 | this.mJumpInfo.objectId = this.contentDetailData.newsId + "" |
| 685 | this.mJumpInfo.relType = this.contentDetailData.reLInfo?.relType + "" | 687 | this.mJumpInfo.relType = this.contentDetailData.reLInfo?.relType + "" |
| 686 | this.mJumpInfo.relId = this.contentDetailData.reLInfo?.relId + "" | 688 | this.mJumpInfo.relId = this.contentDetailData.reLInfo?.relId + "" |
| @@ -86,7 +86,7 @@ export struct ENewspaperItemComponent { | @@ -86,7 +86,7 @@ export struct ENewspaperItemComponent { | ||
| 86 | } as ContentDTO | 86 | } as ContentDTO |
| 87 | ProcessUtils.processPage(content) | 87 | ProcessUtils.processPage(content) |
| 88 | //内容点击 | 88 | //内容点击 |
| 89 | - TrackingContent.commentClickWithEvent('current_Number_Panel_content_click',TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage | 89 | + TrackingContent.clickWithEvent('current_Number_Panel_content_click',TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage |
| 90 | ,{ | 90 | ,{ |
| 91 | 'contentName':this.itemBeanClicked.title, | 91 | 'contentName':this.itemBeanClicked.title, |
| 92 | 'contentType':this.itemBeanClicked.newsType, | 92 | 'contentType':this.itemBeanClicked.newsType, |
| @@ -36,7 +36,7 @@ export struct ENewspaperPageComponent { | @@ -36,7 +36,7 @@ export struct ENewspaperPageComponent { | ||
| 36 | this.swiperIndex = _swiperIndex > 0 ? _swiperIndex - 1 : _swiperIndex | 36 | this.swiperIndex = _swiperIndex > 0 ? _swiperIndex - 1 : _swiperIndex |
| 37 | 37 | ||
| 38 | //电子报--版面序号选择点击 | 38 | //电子报--版面序号选择点击 |
| 39 | - TrackingContent.commentClickWithEvent('panel_number_selection_click',TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage | 39 | + TrackingContent.clickWithEvent('panel_number_selection_click',TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage |
| 40 | ,{ | 40 | ,{ |
| 41 | 'panelNumber':this.newspaperListBean?.list[this.swiperIndex].pageNum, | 41 | 'panelNumber':this.newspaperListBean?.list[this.swiperIndex].pageNum, |
| 42 | 'panelName':this.newspaperListBean?.list[this.swiperIndex].pageName, | 42 | 'panelName':this.newspaperListBean?.list[this.swiperIndex].pageName, |
| @@ -61,7 +61,7 @@ export struct ENewspaperPageComponent { | @@ -61,7 +61,7 @@ export struct ENewspaperPageComponent { | ||
| 61 | new Date(date.fullYear ? date.fullYear : 0, date.month ? date.month : 0, date.date ? date.date : 0) | 61 | new Date(date.fullYear ? date.fullYear : 0, date.month ? date.month : 0, date.date ? date.date : 0) |
| 62 | } | 62 | } |
| 63 | //日历选择点击 | 63 | //日历选择点击 |
| 64 | - TrackingContent.commentClickWithEvent('date_selection_click',TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage | 64 | + TrackingContent.clickWithEvent('date_selection_click',TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage |
| 65 | ,{ | 65 | ,{ |
| 66 | 'panelNumber':this.newspaperListBean?.list[this.swiperIndex].pageNum, | 66 | 'panelNumber':this.newspaperListBean?.list[this.swiperIndex].pageNum, |
| 67 | 'panelName':this.newspaperListBean?.list[this.swiperIndex].pageName, | 67 | 'panelName':this.newspaperListBean?.list[this.swiperIndex].pageName, |
| @@ -340,7 +340,7 @@ export struct ENewspaperPageComponent { | @@ -340,7 +340,7 @@ export struct ENewspaperPageComponent { | ||
| 340 | if (this.newspaperListBean.list && this.newspaperListBean.list.length > 0) { | 340 | if (this.newspaperListBean.list && this.newspaperListBean.list.length > 0) { |
| 341 | this.isOpenListDialog = true | 341 | this.isOpenListDialog = true |
| 342 | //电子报--读报纸点击 | 342 | //电子报--读报纸点击 |
| 343 | - TrackingContent.commentClickWithEvent('read_newspaper_click',TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage | 343 | + TrackingContent.clickWithEvent('read_newspaper_click',TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage |
| 344 | ,{ | 344 | ,{ |
| 345 | 'panelNumber':this.newspaperListBean?.list[this.swiperIndex].pageNum, | 345 | 'panelNumber':this.newspaperListBean?.list[this.swiperIndex].pageNum, |
| 346 | 'panelName':this.newspaperListBean?.list[this.swiperIndex].pageName, | 346 | 'panelName':this.newspaperListBean?.list[this.swiperIndex].pageName, |
| @@ -15,7 +15,7 @@ export struct InteractMComponent { | @@ -15,7 +15,7 @@ export struct InteractMComponent { | ||
| 15 | build() { | 15 | build() { |
| 16 | Row(){ | 16 | Row(){ |
| 17 | Image(this.messageModel.InteractMsubM.headUrl) | 17 | Image(this.messageModel.InteractMsubM.headUrl) |
| 18 | - .alt($r('app.media.default_head')) | 18 | + .alt(this.messageModel.InteractMsubM.userType === '1'?$r('app.media.default_head'):$r('app.media.AccountOwner_DefaultIcon')) |
| 19 | .width(36) | 19 | .width(36) |
| 20 | .height(36) | 20 | .height(36) |
| 21 | .borderRadius(18) | 21 | .borderRadius(18) |
| @@ -295,7 +295,7 @@ export struct MorningEveningPaperComponent { | @@ -295,7 +295,7 @@ export struct MorningEveningPaperComponent { | ||
| 295 | topPaperTitle(){ | 295 | topPaperTitle(){ |
| 296 | Column(){ | 296 | Column(){ |
| 297 | PaperTitleComponent().margin({top:this.topSafeHeight}) | 297 | PaperTitleComponent().margin({top:this.topSafeHeight}) |
| 298 | - }.height(44+this.topSafeHeight).backgroundColor(this.scrollOffset > 100?this.mixedBgColor:'') | 298 | + }.height(44+this.topSafeHeight).backgroundColor(this.isHasTopView?(this.scrollOffset > 100?this.mixedBgColor:''):this.mixedBgColor) |
| 299 | } | 299 | } |
| 300 | 300 | ||
| 301 | @Builder | 301 | @Builder |
| @@ -3,7 +3,7 @@ import { CompList, ContentDTO, InteractDataDTO} from 'wdBean'; | @@ -3,7 +3,7 @@ import { CompList, ContentDTO, InteractDataDTO} from 'wdBean'; | ||
| 3 | import { BreakpointConstants } from 'wdConstant'; | 3 | import { BreakpointConstants } from 'wdConstant'; |
| 4 | import { Logger } from 'wdKit'; | 4 | import { Logger } from 'wdKit'; |
| 5 | import { PaperSingleColumn999CardView } from '../page/CardView'; | 5 | import { PaperSingleColumn999CardView } from '../page/CardView'; |
| 6 | -import { EmptyComponent } from '../view/EmptyComponent'; | 6 | +import { EmptyComponent,WDViewDefaultType } from '../view/EmptyComponent'; |
| 7 | 7 | ||
| 8 | const TAG = 'SingleColumn999Component'; | 8 | const TAG = 'SingleColumn999Component'; |
| 9 | 9 | ||
| @@ -153,9 +153,8 @@ export struct SingleColumn999Component { | @@ -153,9 +153,8 @@ export struct SingleColumn999Component { | ||
| 153 | }) | 153 | }) |
| 154 | } else { | 154 | } else { |
| 155 | if (this.compListItem && this.compListItem?.operDataList) { | 155 | if (this.compListItem && this.compListItem?.operDataList) { |
| 156 | - EmptyComponent({ emptyHeight: 200 }) | 156 | + EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NoListContent}) |
| 157 | } | 157 | } |
| 158 | - | ||
| 159 | } | 158 | } |
| 160 | } | 159 | } |
| 161 | 160 | ||
| @@ -170,9 +169,13 @@ export struct SingleColumn999Component { | @@ -170,9 +169,13 @@ export struct SingleColumn999Component { | ||
| 170 | */ | 169 | */ |
| 171 | @Builder | 170 | @Builder |
| 172 | buildPaperItem(item: ContentDTO, index: number) { | 171 | buildPaperItem(item: ContentDTO, index: number) { |
| 173 | - PaperSingleColumn999CardView({ | ||
| 174 | - item: item, | ||
| 175 | - index: index, | ||
| 176 | - }) | 172 | + ///屏蔽早晚报 音频 |
| 173 | + if (item.objectType != '13'){ | ||
| 174 | + PaperSingleColumn999CardView({ | ||
| 175 | + item: item, | ||
| 176 | + index: index, | ||
| 177 | + }) | ||
| 178 | + } | ||
| 179 | + | ||
| 177 | } | 180 | } |
| 178 | } | 181 | } |
| @@ -75,7 +75,7 @@ export struct topicInfoView { | @@ -75,7 +75,7 @@ export struct topicInfoView { | ||
| 75 | left: { anchor: "__container__", align: HorizontalAlign.Start }, | 75 | left: { anchor: "__container__", align: HorizontalAlign.Start }, |
| 76 | bottom: this.frontLinkObject.linkUrl.length > 0?{ anchor: "row_detail", align: VerticalAlign.Top }:{ anchor: "__container__", align: VerticalAlign.Bottom } | 76 | bottom: this.frontLinkObject.linkUrl.length > 0?{ anchor: "row_detail", align: VerticalAlign.Top }:{ anchor: "__container__", align: VerticalAlign.Bottom } |
| 77 | }) | 77 | }) |
| 78 | - .margin({ left: 16, right: 16 }) | 78 | + .margin({ left: 16, right: 16, bottom: this.frontLinkObject.linkUrl.length > 0?0:16}) |
| 79 | .id('txt_summary') | 79 | .id('txt_summary') |
| 80 | 80 | ||
| 81 | Text(this.frontLinkObject?.title ?? "") | 81 | Text(this.frontLinkObject?.title ?? "") |
| @@ -12,6 +12,7 @@ import { EmptyComponent } from '../components/view/EmptyComponent'; | @@ -12,6 +12,7 @@ import { EmptyComponent } from '../components/view/EmptyComponent'; | ||
| 12 | import { NetworkUtil, WindowModel } from 'wdKit'; | 12 | import { NetworkUtil, WindowModel } from 'wdKit'; |
| 13 | import { viewBlogItemInsightIntentShare } from '../utils/InsightIntentShare' | 13 | import { viewBlogItemInsightIntentShare } from '../utils/InsightIntentShare' |
| 14 | import { common } from '@kit.AbilityKit'; | 14 | import { common } from '@kit.AbilityKit'; |
| 15 | +import { PageRepository } from '../repository/PageRepository'; | ||
| 15 | 16 | ||
| 16 | const TAG: string = 'SpacialTopicPageComponent' | 17 | const TAG: string = 'SpacialTopicPageComponent' |
| 17 | 18 | ||
| @@ -59,7 +60,6 @@ export struct SpacialTopicPageComponent { | @@ -59,7 +60,6 @@ export struct SpacialTopicPageComponent { | ||
| 59 | 60 | ||
| 60 | private async getDetail() { | 61 | private async getDetail() { |
| 61 | this.isNetConnected = NetworkUtil.isNetConnected() | 62 | this.isNetConnected = NetworkUtil.isNetConnected() |
| 62 | - | ||
| 63 | let contentId: string = '' | 63 | let contentId: string = '' |
| 64 | let relId: string = '' | 64 | let relId: string = '' |
| 65 | let relType: string = '' | 65 | let relType: string = '' |
| @@ -74,23 +74,31 @@ export struct SpacialTopicPageComponent { | @@ -74,23 +74,31 @@ export struct SpacialTopicPageComponent { | ||
| 74 | if (this.action.params.extra.relType) { | 74 | if (this.action.params.extra.relType) { |
| 75 | relType = this.action.params.extra.relType | 75 | relType = this.action.params.extra.relType |
| 76 | } | 76 | } |
| 77 | - | ||
| 78 | } | 77 | } |
| 79 | - let detailBeans = await DetailViewModel.getDetailPageData(relId, contentId, relType) | ||
| 80 | - if (detailBeans && detailBeans.length > 0) { | ||
| 81 | - this.contentDetailData = detailBeans[0]; | ||
| 82 | - this.viewBlogInsightIntentShare() | ||
| 83 | - // if (this.contentDetailData[0]?.openComment) { | ||
| 84 | - this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '') | ||
| 85 | - this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId || '') | ||
| 86 | - this.publishCommentModel.targetTitle = this.contentDetailData?.newsTitle | ||
| 87 | - this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType || '') | ||
| 88 | - this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId || '') | ||
| 89 | - this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle || '') | ||
| 90 | - this.publishCommentModel.targetType = String(this.contentDetailData?.newsType || '') | ||
| 91 | - this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment || '') | ||
| 92 | - // } | ||
| 93 | - this.trySendData2H5() | 78 | + let pageId = this.action.params.extra?.pageId |
| 79 | + console.log('pageIdpageId',pageId) | ||
| 80 | + if(pageId){ | ||
| 81 | + let pageInfoMsg = await PageRepository.fetchMorningEveningPageInfo(pageId) | ||
| 82 | + let detailBeans = await DetailViewModel.getDetailPageData(relId, contentId, relType) | ||
| 83 | + if (detailBeans?.length > 0) { | ||
| 84 | + this.contentDetailData = JSON.parse(JSON.stringify(detailBeans[0])); | ||
| 85 | + this.viewBlogInsightIntentShare() | ||
| 86 | + // if (this.contentDetailData[0]?.openComment) { | ||
| 87 | + this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '') | ||
| 88 | + this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId || '') | ||
| 89 | + this.publishCommentModel.targetTitle = this.contentDetailData?.newsTitle | ||
| 90 | + this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType || '') | ||
| 91 | + this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId || '') | ||
| 92 | + this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle || '') | ||
| 93 | + this.publishCommentModel.targetType = String(this.contentDetailData?.newsType || '') | ||
| 94 | + this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment || '') | ||
| 95 | + // } | ||
| 96 | + this.trySendData2H5() | ||
| 97 | + } | ||
| 98 | + if(pageInfoMsg && pageInfoMsg.data){ | ||
| 99 | + this.contentDetailData.openComment = Number(pageInfoMsg.data.topicInfo.commentFlag) | ||
| 100 | + this.contentDetailData.commentDisplay = Number(pageInfoMsg.data.topicInfo.commentShowFlag) | ||
| 101 | + } | ||
| 94 | } | 102 | } |
| 95 | } | 103 | } |
| 96 | } | 104 | } |
| @@ -77,15 +77,8 @@ export struct Card10Component { | @@ -77,15 +77,8 @@ export struct Card10Component { | ||
| 77 | InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName) | 77 | InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName) |
| 78 | ProcessUtils.processPage(this.contentDTO) | 78 | ProcessUtils.processPage(this.contentDTO) |
| 79 | }) | 79 | }) |
| 80 | - if(this.contentDTO.objectType == '5'){ | ||
| 81 | - Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center).margin({ left: 5, bottom: 5 }) | ||
| 82 | - } else { | ||
| 83 | - if (this.contentDTO.seoTags) { | ||
| 84 | - Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center) | ||
| 85 | - } | ||
| 86 | - if (this.contentDTO.newTags) { | ||
| 87 | - Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center) | ||
| 88 | - } | 80 | + if (this.contentDTO.objectType == '5') { |
| 81 | + Notes({ objectType: 5 }).margin({ left: 5, bottom: 5 }) | ||
| 89 | } | 82 | } |
| 90 | }.alignContent(Alignment.BottomStart) | 83 | }.alignContent(Alignment.BottomStart) |
| 91 | 84 | ||
| @@ -135,15 +128,8 @@ export struct Card10Component { | @@ -135,15 +128,8 @@ export struct Card10Component { | ||
| 135 | Row() { | 128 | Row() { |
| 136 | Column() { | 129 | Column() { |
| 137 | Stack() { | 130 | Stack() { |
| 138 | - if(this.contentDTO.objectType == '5'){ | ||
| 139 | - Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center) | ||
| 140 | - } else { | ||
| 141 | - if (this.contentDTO.seoTags) { | ||
| 142 | - Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center) | ||
| 143 | - } | ||
| 144 | - if (this.contentDTO.newTags) { | ||
| 145 | - Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center) | ||
| 146 | - } | 131 | + if (item.objectType == '5') { |
| 132 | + Notes({ objectType: 5 }) | ||
| 147 | } | 133 | } |
| 148 | Text(item.newsTitle) | 134 | Text(item.newsTitle) |
| 149 | .fontSize($r('app.float.font_size_17')) | 135 | .fontSize($r('app.float.font_size_17')) |
| @@ -151,12 +137,10 @@ export struct Card10Component { | @@ -151,12 +137,10 @@ export struct Card10Component { | ||
| 151 | .fontColor($r('app.color.color_222222')) | 137 | .fontColor($r('app.color.color_222222')) |
| 152 | .maxLines(2) | 138 | .maxLines(2) |
| 153 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 139 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| 154 | - .textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 && | ||
| 155 | - (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? 58 : | ||
| 156 | - ((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5') ? 35 : | ||
| 157 | - 0 ) | 140 | + .textIndent(item.objectType == '5' ? 38 : 0) |
| 158 | }.alignContent(Alignment.TopStart) | 141 | }.alignContent(Alignment.TopStart) |
| 159 | 142 | ||
| 143 | + Blank() | ||
| 160 | //bottom 评论等信息 | 144 | //bottom 评论等信息 |
| 161 | CardSourceInfo( | 145 | CardSourceInfo( |
| 162 | { | 146 | { |
| @@ -166,6 +150,7 @@ export struct Card10Component { | @@ -166,6 +150,7 @@ export struct Card10Component { | ||
| 166 | ) | 150 | ) |
| 167 | } | 151 | } |
| 168 | .layoutWeight(1) | 152 | .layoutWeight(1) |
| 153 | + .height(78) | ||
| 169 | .alignItems(HorizontalAlign.Start) | 154 | .alignItems(HorizontalAlign.Start) |
| 170 | 155 | ||
| 171 | // 右侧图片 | 156 | // 右侧图片 |
| @@ -183,6 +168,7 @@ export struct Card10Component { | @@ -183,6 +168,7 @@ export struct Card10Component { | ||
| 183 | }) | 168 | }) |
| 184 | } | 169 | } |
| 185 | .alignContent(Alignment.BottomEnd) | 170 | .alignContent(Alignment.BottomEnd) |
| 171 | + .height(78) | ||
| 186 | } | 172 | } |
| 187 | } | 173 | } |
| 188 | .padding({ top: 10, bottom: 10 }) | 174 | .padding({ top: 10, bottom: 10 }) |
| @@ -39,13 +39,13 @@ export struct Card11Component { | @@ -39,13 +39,13 @@ export struct Card11Component { | ||
| 39 | Column() { | 39 | Column() { |
| 40 | Stack() { | 40 | Stack() { |
| 41 | if(this.contentDTO.objectType == '5'){ | 41 | if(this.contentDTO.objectType == '5'){ |
| 42 | - Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center) | 42 | + Notes({ objectType: this.contentDTO.objectType }).height(20).align(Alignment.Center) |
| 43 | } else { | 43 | } else { |
| 44 | if (this.contentDTO.seoTags) { | 44 | if (this.contentDTO.seoTags) { |
| 45 | - Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center) | 45 | + Notes({ newTags: this.contentDTO.seoTags }).height(20).align(Alignment.Center) |
| 46 | } | 46 | } |
| 47 | if (this.contentDTO.newTags) { | 47 | if (this.contentDTO.newTags) { |
| 48 | - Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center) | 48 | + Notes({ newTags: this.contentDTO.newTags }).height(20).align(Alignment.Center) |
| 49 | } | 49 | } |
| 50 | } | 50 | } |
| 51 | Text() { | 51 | Text() { |
| @@ -61,13 +61,13 @@ export struct Card2Component { | @@ -61,13 +61,13 @@ export struct Card2Component { | ||
| 61 | // } | 61 | // } |
| 62 | // } | 62 | // } |
| 63 | if(this.contentDTO.objectType == '5'){ | 63 | if(this.contentDTO.objectType == '5'){ |
| 64 | - Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center) | 64 | + Notes({ objectType: this.contentDTO.objectType }).height(20).align(Alignment.Center) |
| 65 | } else { | 65 | } else { |
| 66 | if (this.contentDTO.seoTags) { | 66 | if (this.contentDTO.seoTags) { |
| 67 | - Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center) | 67 | + Notes({ newTags: this.contentDTO.seoTags }).height(20).align(Alignment.Center) |
| 68 | } | 68 | } |
| 69 | if (this.contentDTO.newTags) { | 69 | if (this.contentDTO.newTags) { |
| 70 | - Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center) | 70 | + Notes({ newTags: this.contentDTO.newTags }).height(20).align(Alignment.Center) |
| 71 | } | 71 | } |
| 72 | } | 72 | } |
| 73 | //新闻标题 | 73 | //新闻标题 |
| @@ -42,13 +42,13 @@ export struct Card3Component { | @@ -42,13 +42,13 @@ export struct Card3Component { | ||
| 42 | // Notes({ objectType: this.contentDTO.objectType }).height(27).align(Alignment.Center) | 42 | // Notes({ objectType: this.contentDTO.objectType }).height(27).align(Alignment.Center) |
| 43 | // } | 43 | // } |
| 44 | if(this.contentDTO.objectType == '5'){ | 44 | if(this.contentDTO.objectType == '5'){ |
| 45 | - Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center) | 45 | + Notes({ objectType: this.contentDTO.objectType }).height(20).align(Alignment.Center) |
| 46 | } else { | 46 | } else { |
| 47 | if (this.contentDTO.seoTags) { | 47 | if (this.contentDTO.seoTags) { |
| 48 | - Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center) | 48 | + Notes({ newTags: this.contentDTO.seoTags }).height(20).align(Alignment.Center) |
| 49 | } | 49 | } |
| 50 | if (this.contentDTO.newTags) { | 50 | if (this.contentDTO.newTags) { |
| 51 | - Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center) | 51 | + Notes({ newTags: this.contentDTO.newTags }).height(20).align(Alignment.Center) |
| 52 | } | 52 | } |
| 53 | } | 53 | } |
| 54 | Text() { | 54 | Text() { |
| @@ -58,13 +58,13 @@ export struct Card5Component { | @@ -58,13 +58,13 @@ export struct Card5Component { | ||
| 58 | Row() { | 58 | Row() { |
| 59 | Stack() { | 59 | Stack() { |
| 60 | if(this.contentDTO.objectType == '5'){ | 60 | if(this.contentDTO.objectType == '5'){ |
| 61 | - Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center) | 61 | + Notes({ objectType: this.contentDTO.objectType }).height(20).align(Alignment.Center) |
| 62 | } else { | 62 | } else { |
| 63 | if (this.contentDTO.seoTags) { | 63 | if (this.contentDTO.seoTags) { |
| 64 | - Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center) | 64 | + Notes({ newTags: this.contentDTO.seoTags }).height(20).align(Alignment.Center) |
| 65 | } | 65 | } |
| 66 | if (this.contentDTO.newTags) { | 66 | if (this.contentDTO.newTags) { |
| 67 | - Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center) | 67 | + Notes({ newTags: this.contentDTO.newTags }).height(20).align(Alignment.Center) |
| 68 | } | 68 | } |
| 69 | } | 69 | } |
| 70 | 70 |
| @@ -53,17 +53,16 @@ export struct Card6Component { | @@ -53,17 +53,16 @@ export struct Card6Component { | ||
| 53 | // } | 53 | // } |
| 54 | Stack() { | 54 | Stack() { |
| 55 | if(this.contentDTO.objectType == '5'){ | 55 | if(this.contentDTO.objectType == '5'){ |
| 56 | - Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center) | 56 | + Notes({ objectType: this.contentDTO.objectType }).height(28).align(Alignment.Center) |
| 57 | } else { | 57 | } else { |
| 58 | if (this.contentDTO.seoTags) { | 58 | if (this.contentDTO.seoTags) { |
| 59 | - Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center) | 59 | + Notes({ newTags: this.contentDTO.seoTags }).height(28).align(Alignment.Center) |
| 60 | } | 60 | } |
| 61 | if (this.contentDTO.newTags) { | 61 | if (this.contentDTO.newTags) { |
| 62 | - Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center) | 62 | + Notes({ newTags: this.contentDTO.newTags }).height(28).align(Alignment.Center) |
| 63 | } | 63 | } |
| 64 | } | 64 | } |
| 65 | 65 | ||
| 66 | - | ||
| 67 | Text() { | 66 | Text() { |
| 68 | if (this.titleMarked) { | 67 | if (this.titleMarked) { |
| 69 | ForEach(this.textArr, (textItem: textItem) => { | 68 | ForEach(this.textArr, (textItem: textItem) => { |
| @@ -89,14 +89,14 @@ export struct Card9Component { | @@ -89,14 +89,14 @@ export struct Card9Component { | ||
| 89 | topRight: $r('app.float.image_border_radius') | 89 | topRight: $r('app.float.image_border_radius') |
| 90 | }) | 90 | }) |
| 91 | if(this.contentDTO.objectType == '5'){ | 91 | if(this.contentDTO.objectType == '5'){ |
| 92 | - Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center) | 92 | + Notes({ objectType: this.contentDTO.objectType }).height(20).align(Alignment.Center) |
| 93 | .margin({ left: 5, bottom: 5 }) | 93 | .margin({ left: 5, bottom: 5 }) |
| 94 | } else { | 94 | } else { |
| 95 | if (this.contentDTO.seoTags) { | 95 | if (this.contentDTO.seoTags) { |
| 96 | - Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center) | 96 | + Notes({ newTags: this.contentDTO.seoTags }).height(20).align(Alignment.Center) |
| 97 | } | 97 | } |
| 98 | if (this.contentDTO.newTags) { | 98 | if (this.contentDTO.newTags) { |
| 99 | - Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center) | 99 | + Notes({ newTags: this.contentDTO.newTags }).height(20).align(Alignment.Center) |
| 100 | } | 100 | } |
| 101 | } | 101 | } |
| 102 | 102 |
| @@ -41,7 +41,8 @@ export class publishCommentModel { | @@ -41,7 +41,8 @@ export class publishCommentModel { | ||
| 41 | 41 | ||
| 42 | //最新发布的评论 | 42 | //最新发布的评论 |
| 43 | lastCommentModel: commentItemModel = new commentItemModel() | 43 | lastCommentModel: commentItemModel = new commentItemModel() |
| 44 | - | 44 | + pageId: string = '' |
| 45 | + pageName: string = '' | ||
| 45 | 46 | ||
| 46 | } | 47 | } |
| 47 | 48 |
| @@ -16,7 +16,7 @@ const TAG = 'CommentComponent'; | @@ -16,7 +16,7 @@ const TAG = 'CommentComponent'; | ||
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | const testString = '因为读书的人\n是低着头向上看的人\n身处一隅,却能放眼世界\n2,因为读书的人\n总是比不读书的人\n活得有趣一点\n3,因为读书的人\n即使平凡,绝不平庸' | 18 | const testString = '因为读书的人\n是低着头向上看的人\n身处一隅,却能放眼世界\n2,因为读书的人\n总是比不读书的人\n活得有趣一点\n3,因为读书的人\n即使平凡,绝不平庸' |
| 19 | - | 19 | +//评论组件 |
| 20 | // @Entry | 20 | // @Entry |
| 21 | @Preview | 21 | @Preview |
| 22 | @Component | 22 | @Component |
| @@ -6,6 +6,7 @@ import { | @@ -6,6 +6,7 @@ import { | ||
| 6 | import { HttpBizUtil, HttpUrlUtils, HttpUtils, ResponseDTO } from 'wdNetwork/Index'; | 6 | import { HttpBizUtil, HttpUrlUtils, HttpUtils, ResponseDTO } from 'wdNetwork/Index'; |
| 7 | import { HttpRequest } from 'wdNetwork/src/main/ets/http/HttpRequest'; | 7 | import { HttpRequest } from 'wdNetwork/src/main/ets/http/HttpRequest'; |
| 8 | import { ProcessUtils, WDRouterPage, WDRouterRule } from 'wdRouter/Index'; | 8 | import { ProcessUtils, WDRouterPage, WDRouterRule } from 'wdRouter/Index'; |
| 9 | +import { TrackConstants, TrackingContent } from 'wdTracking/Index'; | ||
| 9 | import { | 10 | import { |
| 10 | commentItemModel, | 11 | commentItemModel, |
| 11 | commentListModel, | 12 | commentListModel, |
| @@ -16,7 +17,7 @@ import { | @@ -16,7 +17,7 @@ import { | ||
| 16 | import { publishCommentModel } from '../model/PublishCommentModel'; | 17 | import { publishCommentModel } from '../model/PublishCommentModel'; |
| 17 | 18 | ||
| 18 | const TAG = "CommentViewModel" | 19 | const TAG = "CommentViewModel" |
| 19 | - | 20 | +//评论model |
| 20 | class CommentViewModel { | 21 | class CommentViewModel { |
| 21 | private static instance: CommentViewModel | 22 | private static instance: CommentViewModel |
| 22 | 23 | ||
| @@ -166,9 +167,9 @@ class CommentViewModel { | @@ -166,9 +167,9 @@ class CommentViewModel { | ||
| 166 | return new Promise<commentItemModel>((success, fail) => { | 167 | return new Promise<commentItemModel>((success, fail) => { |
| 167 | const visitorMode = model.visitorComment == "1" && HttpUtils.isLogin() == false | 168 | const visitorMode = model.visitorComment == "1" && HttpUtils.isLogin() == false |
| 168 | let url = visitorMode ? HttpUrlUtils.getNoUserPublishCommentUrl() : HttpUrlUtils.getPublishCommentUrl() | 169 | let url = visitorMode ? HttpUrlUtils.getNoUserPublishCommentUrl() : HttpUrlUtils.getPublishCommentUrl() |
| 169 | - | 170 | + let pageId = model.pageId; |
| 171 | + let pageName = model.pageName; | ||
| 170 | let bean: Record<string, string> = {}; | 172 | let bean: Record<string, string> = {}; |
| 171 | - | ||
| 172 | bean['targetId'] = model.targetId; | 173 | bean['targetId'] = model.targetId; |
| 173 | bean['targetRelId'] = model.targetRelId; | 174 | bean['targetRelId'] = model.targetRelId; |
| 174 | bean['commentType'] = model.commentType; | 175 | bean['commentType'] = model.commentType; |
| @@ -188,6 +189,11 @@ class CommentViewModel { | @@ -188,6 +189,11 @@ class CommentViewModel { | ||
| 188 | } | 189 | } |
| 189 | 190 | ||
| 190 | HttpRequest.post<ResponseDTO<commentItemModel>>(url, bean).then((data: ResponseDTO<commentItemModel>) => { | 191 | HttpRequest.post<ResponseDTO<commentItemModel>>(url, bean).then((data: ResponseDTO<commentItemModel>) => { |
| 192 | + // fixme 埋点 评论发布点击 | ||
| 193 | + TrackingContent.commentClick(pageId,pageName | ||
| 194 | + ,{ | ||
| 195 | + 'duration':0, | ||
| 196 | + }) | ||
| 191 | if (data.code != 0) { | 197 | if (data.code != 0) { |
| 192 | ToastUtils.showToast(data.message, 1000); | 198 | ToastUtils.showToast(data.message, 1000); |
| 193 | fail() | 199 | fail() |
| @@ -16,7 +16,7 @@ export default struct MinePagePersonFunctionUI { | @@ -16,7 +16,7 @@ export default struct MinePagePersonFunctionUI { | ||
| 16 | Grid(){ | 16 | Grid(){ |
| 17 | ForEach(this.personalData,(item:MinePagePersonalFunctionsItem,index:number)=>{ | 17 | ForEach(this.personalData,(item:MinePagePersonalFunctionsItem,index:number)=>{ |
| 18 | GridItem(){ | 18 | GridItem(){ |
| 19 | - PagePersonFunction({ item: item, noDivider : (index % 4 < 3 && index != this.personalData.length-1) ? false : true}) | 19 | + PagePersonFunction({ item: item, noDivider : (index % 5 < 4 && index != this.personalData.length-1) ? false : true}) |
| 20 | }.onClick(()=>{ | 20 | }.onClick(()=>{ |
| 21 | console.log(index+"") | 21 | console.log(index+"") |
| 22 | switch (item.msg){ | 22 | switch (item.msg){ |
| @@ -77,14 +77,14 @@ export default struct MinePagePersonFunctionUI { | @@ -77,14 +77,14 @@ export default struct MinePagePersonFunctionUI { | ||
| 77 | break; | 77 | break; |
| 78 | } | 78 | } |
| 79 | } | 79 | } |
| 80 | - }).width('169lpx') | 80 | + }).width('142lpx') |
| 81 | .height('117lpx') | 81 | .height('117lpx') |
| 82 | }) | 82 | }) |
| 83 | } | 83 | } |
| 84 | - .rowsTemplate('1fr 1fr') | ||
| 85 | - .columnsTemplate('1fr 1fr 1fr 1fr') | ||
| 86 | - .height('234lpx') | ||
| 87 | - .margin({top:'31lpx',left:'23lpx',right:'23lpx' }) | 84 | + .rowsTemplate('1fr') |
| 85 | + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') | ||
| 86 | + .height('117lpx') | ||
| 87 | + .margin({top:'31lpx'}) | ||
| 88 | } | 88 | } |
| 89 | 89 | ||
| 90 | messageClick(){ | 90 | messageClick(){ |
| @@ -542,11 +542,19 @@ export struct PaperSingleColumn999CardView { | @@ -542,11 +542,19 @@ export struct PaperSingleColumn999CardView { | ||
| 542 | if (this.item) { | 542 | if (this.item) { |
| 543 | Row() { | 543 | Row() { |
| 544 | Row() { | 544 | Row() { |
| 545 | + | ||
| 546 | + if (this.item.corner.length > 0){ | ||
| 547 | + Text(this.item.corner) | ||
| 548 | + .fontSize(12) | ||
| 549 | + .fontColor('#ED2800') | ||
| 550 | + .margin({ left: 16 }) | ||
| 551 | + } | ||
| 552 | + | ||
| 545 | if (this.buildSourceString().length > 0) { | 553 | if (this.buildSourceString().length > 0) { |
| 546 | Text(this.buildSourceString()) | 554 | Text(this.buildSourceString()) |
| 547 | .fontSize(12) | 555 | .fontSize(12) |
| 548 | .fontColor('#B0B0B0') | 556 | .fontColor('#B0B0B0') |
| 549 | - .margin({ left: 16 }) | 557 | + .margin({ left: this.item.corner.length > 0?10:16 }) |
| 550 | 558 | ||
| 551 | ///不显示时间或者不显示评论 | 559 | ///不显示时间或者不显示评论 |
| 552 | if (this.getPublishTime().length > 0 || this.item.objectType != '2' && this.interactData && this.interactData.commentNum && Number(this.interactData.commentNum) > 0) { | 560 | if (this.getPublishTime().length > 0 || this.item.objectType != '2' && this.interactData && this.interactData.commentNum && Number(this.interactData.commentNum) > 0) { |
| @@ -114,6 +114,7 @@ struct MyCollectionListPage { | @@ -114,6 +114,7 @@ struct MyCollectionListPage { | ||
| 114 | .height(CommonConstants.FULL_HEIGHT) | 114 | .height(CommonConstants.FULL_HEIGHT) |
| 115 | } | 115 | } |
| 116 | } | 116 | } |
| 117 | + .backgroundColor('#FFFFFF') | ||
| 117 | .width(CommonConstants.FULL_WIDTH) | 118 | .width(CommonConstants.FULL_WIDTH) |
| 118 | .height(CommonConstants.FULL_HEIGHT) | 119 | .height(CommonConstants.FULL_HEIGHT) |
| 119 | } | 120 | } |
| @@ -62,8 +62,7 @@ export function viewBlogInsightIntentShare(context: common.UIAbilityContext, ent | @@ -62,8 +62,7 @@ export function viewBlogInsightIntentShare(context: common.UIAbilityContext, ent | ||
| 62 | commentCount: _item?.interactData?.commentNum || 0, | 62 | commentCount: _item?.interactData?.commentNum || 0, |
| 63 | favorites: _item?.interactData?.collectNum || 0, | 63 | favorites: _item?.interactData?.collectNum || 0, |
| 64 | viewCount: _item?.interactData?.readNum || 0, | 64 | viewCount: _item?.interactData?.readNum || 0, |
| 65 | - rankingHint: 99, | ||
| 66 | - isPublicData: true | 65 | + rankingHint: 99 |
| 67 | } | 66 | } |
| 68 | } | 67 | } |
| 69 | insightIntentArray.push(viewBlogInsightIntentItem) | 68 | insightIntentArray.push(viewBlogInsightIntentItem) |
| @@ -113,8 +112,7 @@ export function viewBlogItemInsightIntentShare(context: common.UIAbilityContext, | @@ -113,8 +112,7 @@ export function viewBlogItemInsightIntentShare(context: common.UIAbilityContext, | ||
| 113 | forwardCount: interactData?.shareNum || 0, | 112 | forwardCount: interactData?.shareNum || 0, |
| 114 | commentCount: interactData?.commentNum || 0, | 113 | commentCount: interactData?.commentNum || 0, |
| 115 | favorites: interactData?.collectNum || 0, | 114 | favorites: interactData?.collectNum || 0, |
| 116 | - rankingHint: 99, | ||
| 117 | - isPublicData: true | 115 | + rankingHint: 99 |
| 118 | } | 116 | } |
| 119 | } | 117 | } |
| 120 | 118 | ||
| @@ -147,8 +145,7 @@ export function viewColumInsightIntentShare(context: common.UIAbilityContext, en | @@ -147,8 +145,7 @@ export function viewColumInsightIntentShare(context: common.UIAbilityContext, en | ||
| 147 | activityType: ['RecentViews'], | 145 | activityType: ['RecentViews'], |
| 148 | columnTitle: pageInfoBean?.topicInfo?.title, | 146 | columnTitle: pageInfoBean?.topicInfo?.title, |
| 149 | columnSubTitle: pageInfoBean?.shareSummary, | 147 | columnSubTitle: pageInfoBean?.shareSummary, |
| 150 | - rankingHint: 99, | ||
| 151 | - isPublicData: true | 148 | + rankingHint: 99 |
| 152 | } | 149 | } |
| 153 | } | 150 | } |
| 154 | console.log('yzl viewColumInsightIntentShare', JSON.stringify(viewColumInsightIntentItem)) | 151 | console.log('yzl viewColumInsightIntentShare', JSON.stringify(viewColumInsightIntentItem)) |
sight_harmony/features/wdComponent/src/main/resources/base/media/AccountOwner_DefaultIcon.png
0 → 100644
4.68 KB
| @@ -16,6 +16,7 @@ | @@ -16,6 +16,7 @@ | ||
| 16 | "wdConstant": "file:../../commons/wdConstant", | 16 | "wdConstant": "file:../../commons/wdConstant", |
| 17 | "wdDetailPlayApi": "file:../../features/wdDetailPlayApi", | 17 | "wdDetailPlayApi": "file:../../features/wdDetailPlayApi", |
| 18 | "wdComponent": "file:../../features/wdComponent", | 18 | "wdComponent": "file:../../features/wdComponent", |
| 19 | - "wdShare": "file:../../features/wdShare" | 19 | + "wdShare": "file:../../features/wdShare", |
| 20 | + "wdTracking": "file:../../features/wdTracking" | ||
| 20 | } | 21 | } |
| 21 | } | 22 | } |
| @@ -8,6 +8,8 @@ import { contentListParams } from 'wdDetailPlayApi/src/main/ets/request/ContentD | @@ -8,6 +8,8 @@ import { contentListParams } from 'wdDetailPlayApi/src/main/ets/request/ContentD | ||
| 8 | import { DisplayDirection } from 'wdConstant/Index'; | 8 | import { DisplayDirection } from 'wdConstant/Index'; |
| 9 | import { window } from '@kit.ArkUI'; | 9 | import { window } from '@kit.ArkUI'; |
| 10 | import { EmptyComponent } from 'wdComponent/Index'; | 10 | import { EmptyComponent } from 'wdComponent/Index'; |
| 11 | +import { DateTimeUtils } from 'wdKit/Index'; | ||
| 12 | +import { TrackConstants, TrackingPageBrowse } from 'wdTracking/Index'; | ||
| 11 | 13 | ||
| 12 | const storage = LocalStorage.getShared(); | 14 | const storage = LocalStorage.getShared(); |
| 13 | const TAG = 'DetailVideoListPage' | 15 | const TAG = 'DetailVideoListPage' |
| @@ -33,6 +35,8 @@ export struct DetailVideoListPage { | @@ -33,6 +35,8 @@ export struct DetailVideoListPage { | ||
| 33 | @State currentIndex: number = 0 | 35 | @State currentIndex: number = 0 |
| 34 | @State netStatus: number | undefined = undefined // 存储网络状态用来展示缺省图 | 36 | @State netStatus: number | undefined = undefined // 存储网络状态用来展示缺省图 |
| 35 | @State interactDataList: InteractDataDTO[] = [] | 37 | @State interactDataList: InteractDataDTO[] = [] |
| 38 | + pageShowTime:number = 0; | ||
| 39 | + pageHideTime:number = 0; | ||
| 36 | 40 | ||
| 37 | async aboutToAppear(): Promise<void> { | 41 | async aboutToAppear(): Promise<void> { |
| 38 | // 注册监听网络连接 | 42 | // 注册监听网络连接 |
| @@ -70,12 +74,18 @@ export struct DetailVideoListPage { | @@ -70,12 +74,18 @@ export struct DetailVideoListPage { | ||
| 70 | this.switchVideoStatus = true | 74 | this.switchVideoStatus = true |
| 71 | this.openFullScreen() | 75 | this.openFullScreen() |
| 72 | 76 | ||
| 77 | + this.pageShowTime = DateTimeUtils.getTimeStamp() | ||
| 73 | } | 78 | } |
| 74 | 79 | ||
| 75 | onPageHide(): void { | 80 | onPageHide(): void { |
| 76 | console.log(TAG, 'onPageHide') | 81 | console.log(TAG, 'onPageHide') |
| 77 | this.switchVideoStatus = false | 82 | this.switchVideoStatus = false |
| 78 | this.closeFullScreen() | 83 | this.closeFullScreen() |
| 84 | + | ||
| 85 | + this.pageHideTime = DateTimeUtils.getTimeStamp() | ||
| 86 | + let duration = 0 | ||
| 87 | + duration = Math.floor((this.pageHideTime - this.pageShowTime)/1000) | ||
| 88 | + TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Customer_Personal,TrackConstants.PageName.Customer_Personal,duration) | ||
| 79 | } | 89 | } |
| 80 | 90 | ||
| 81 | /** | 91 | /** |
| @@ -14,6 +14,8 @@ import { PictureLoading } from './PictureLoading'; | @@ -14,6 +14,8 @@ import { PictureLoading } from './PictureLoading'; | ||
| 14 | import { DisplayDirection } from 'wdConstant/Index'; | 14 | import { DisplayDirection } from 'wdConstant/Index'; |
| 15 | import { window } from '@kit.ArkUI'; | 15 | import { window } from '@kit.ArkUI'; |
| 16 | import { EmptyComponent, WDViewDefaultType } from 'wdComponent/Index'; | 16 | import { EmptyComponent, WDViewDefaultType } from 'wdComponent/Index'; |
| 17 | +import { DateTimeUtils } from 'wdKit/Index'; | ||
| 18 | +import {TrackConstants,TrackingPageBrowse } from 'wdTracking/Index'; | ||
| 17 | 19 | ||
| 18 | interface loadMoreData { | 20 | interface loadMoreData { |
| 19 | pageNum: number; | 21 | pageNum: number; |
| @@ -59,6 +61,8 @@ export struct VideoChannelDetail { | @@ -59,6 +61,8 @@ export struct VideoChannelDetail { | ||
| 59 | @State totalCount: number = 0 | 61 | @State totalCount: number = 0 |
| 60 | @State isMouted: boolean = false | 62 | @State isMouted: boolean = false |
| 61 | @State isRequestError: boolean = false | 63 | @State isRequestError: boolean = false |
| 64 | + pageShowTime:number = 0; | ||
| 65 | + pageHideTime:number = 0; | ||
| 62 | 66 | ||
| 63 | autoRefreshChange() { | 67 | autoRefreshChange() { |
| 64 | if (this.topNavIndex === 0) { | 68 | if (this.topNavIndex === 0) { |
| @@ -78,12 +82,21 @@ export struct VideoChannelDetail { | @@ -78,12 +82,21 @@ export struct VideoChannelDetail { | ||
| 78 | this.switchVideoStatus = true | 82 | this.switchVideoStatus = true |
| 79 | this.openFullScreen() | 83 | this.openFullScreen() |
| 80 | } | 84 | } |
| 85 | + | ||
| 86 | + this.pageShowTime = DateTimeUtils.getTimeStamp() | ||
| 87 | + console.log(TAG, '一级视频显示') | ||
| 81 | } | 88 | } |
| 82 | 89 | ||
| 83 | pageHideChange() { | 90 | pageHideChange() { |
| 84 | this.barBackgroundColor = Color.Transparent | 91 | this.barBackgroundColor = Color.Transparent |
| 85 | this.switchVideoStatus = false | 92 | this.switchVideoStatus = false |
| 86 | this.closeFullScreen() | 93 | this.closeFullScreen() |
| 94 | + | ||
| 95 | + console.log(TAG, '一级视频隐藏') | ||
| 96 | + this.pageHideTime = DateTimeUtils.getTimeStamp() | ||
| 97 | + let duration = 0 | ||
| 98 | + duration = Math.floor((this.pageHideTime - this.pageShowTime)/1000) | ||
| 99 | + TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Customer_Personal,TrackConstants.PageName.Customer_Personal,duration) | ||
| 87 | } | 100 | } |
| 88 | 101 | ||
| 89 | /** | 102 | /** |
| @@ -255,7 +268,6 @@ export struct VideoChannelDetail { | @@ -255,7 +268,6 @@ export struct VideoChannelDetail { | ||
| 255 | }) | 268 | }) |
| 256 | } | 269 | } |
| 257 | } | 270 | } |
| 258 | - | ||
| 259 | build() { | 271 | build() { |
| 260 | Column() { | 272 | Column() { |
| 261 | if (this.isRequestError) { | 273 | if (this.isRequestError) { |
| @@ -14,6 +14,7 @@ import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; | @@ -14,6 +14,7 @@ import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; | ||
| 14 | import { DisplayDirection, SpConstants } from 'wdConstant/Index' | 14 | import { DisplayDirection, SpConstants } from 'wdConstant/Index' |
| 15 | import { WDShare } from "wdShare" | 15 | import { WDShare } from "wdShare" |
| 16 | import { publishCommentModel } from 'wdComponent/Index'; | 16 | import { publishCommentModel } from 'wdComponent/Index'; |
| 17 | +import { ParamType, TrackConstants, TrackingButton, TrackingContent } from 'wdTracking/Index'; | ||
| 17 | 18 | ||
| 18 | interface ILikeStyleResp { | 19 | interface ILikeStyleResp { |
| 19 | url: Resource; | 20 | url: Resource; |
| @@ -37,16 +38,44 @@ export struct PlayerRightView { | @@ -37,16 +38,44 @@ export struct PlayerRightView { | ||
| 37 | @Consume showCommentList: boolean | 38 | @Consume showCommentList: boolean |
| 38 | @Consume displayDirection: DisplayDirection | 39 | @Consume displayDirection: DisplayDirection |
| 39 | @Consume publishCommentModel: publishCommentModel | 40 | @Consume publishCommentModel: publishCommentModel |
| 40 | - @State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 | 41 | + // @State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 |
| 41 | @State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以 | 42 | @State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以 |
| 43 | + @State likesStyle: number | string = this.contentDetailData.likesStyle // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 | ||
| 44 | + pageParam: ParamType = {} | ||
| 45 | + PageName: string = '' | ||
| 46 | + followUserId: string = '' | ||
| 47 | + followUserName: string = '' | ||
| 48 | + | ||
| 42 | aboutToAppear() { | 49 | aboutToAppear() { |
| 43 | // 内容用 点赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 | 50 | // 内容用 点赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 |
| 44 | this.likesStyle = this.contentDetailData.likesStyle | 51 | this.likesStyle = this.contentDetailData.likesStyle |
| 45 | this.openLikes = this.contentDetailData.openLikes == 1 ? true : false | 52 | this.openLikes = this.contentDetailData.openLikes == 1 ? true : false |
| 46 | // console.log(TAG, 'this.likesStyle', this.likesStyle) | 53 | // console.log(TAG, 'this.likesStyle', this.likesStyle) |
| 47 | // console.log(TAG, 'this.openLikes', this.openLikes) | 54 | // console.log(TAG, 'this.openLikes', this.openLikes) |
| 55 | + this.contentTrackingDict() | ||
| 56 | + } | ||
| 57 | + contentTrackingDict(){ | ||
| 58 | + this.pageParam = { | ||
| 59 | + 'contentType': `${this.contentDetailData.newsType}`, | ||
| 60 | + 'contentId': `${this.contentDetailData.newsId}`, | ||
| 61 | + 'contentName': `${this.contentDetailData.newsTitle || ''}`, | ||
| 62 | + } | ||
| 63 | + if(this.contentDetailData.newsType == 1) { | ||
| 64 | + this.PageName = TrackConstants.PageName.VideoDetail // 点播 | ||
| 65 | + } else if(this.contentDetailData.newsType == 2) { | ||
| 66 | + this.PageName = TrackConstants.PageName.Live_Detail // 直播 | ||
| 67 | + } else if(this.contentDetailData.newsType == 5) { | ||
| 68 | + this.PageName = TrackConstants.PageName.Summary_Detail // 专题详情页 | ||
| 69 | + } else if(this.contentDetailData.newsType == 8) { | ||
| 70 | + this.PageName = TrackConstants.PageName.Article_Detail // 图文详情页 | ||
| 71 | + } else if(this.contentDetailData.newsType == 9) { | ||
| 72 | + this.PageName = TrackConstants.PageName.Atlas_Detail // 图集详情页 | ||
| 73 | + } else if(this.contentDetailData.newsType == 14 || this.contentDetailData.newsType == 15) { | ||
| 74 | + this.PageName = TrackConstants.PageName.DynamicDetail // 动态图文/动态视频 | ||
| 75 | + } | ||
| 76 | + this.followUserId = this.contentDetailData?.rmhInfo?.rmhId || '' | ||
| 77 | + this.followUserName = this.contentDetailData?.rmhInfo?.rmhName || '' | ||
| 48 | } | 78 | } |
| 49 | - | ||
| 50 | /** | 79 | /** |
| 51 | * 点赞、取消点赞 | 80 | * 点赞、取消点赞 |
| 52 | */ | 81 | */ |
| @@ -76,8 +105,12 @@ export struct PlayerRightView { | @@ -76,8 +105,12 @@ export struct PlayerRightView { | ||
| 76 | this.newsStatusOfUser.likeStatus = this.newsStatusOfUser?.likeStatus == '1' ? '0' : '1' | 105 | this.newsStatusOfUser.likeStatus = this.newsStatusOfUser?.likeStatus == '1' ? '0' : '1' |
| 77 | if (this.newsStatusOfUser.likeStatus == '1') { | 106 | if (this.newsStatusOfUser.likeStatus == '1') { |
| 78 | this.interactData.likeNum = Number(this.interactData.likeNum || 0) + 1 | 107 | this.interactData.likeNum = Number(this.interactData.likeNum || 0) + 1 |
| 108 | + TrackingContent.like(true,this.PageName,this.PageName,this.pageParam) | ||
| 109 | + console.log(TAG, '点赞') | ||
| 79 | } else { | 110 | } else { |
| 80 | this.interactData.likeNum = Math.max(0, Number(this.interactData.likeNum || 0) - 1) | 111 | this.interactData.likeNum = Math.max(0, Number(this.interactData.likeNum || 0) - 1) |
| 112 | + TrackingContent.like(false,this.PageName,this.PageName,this.pageParam) | ||
| 113 | + console.log(TAG, '取消点赞') | ||
| 81 | } | 114 | } |
| 82 | console.log(TAG, '点赞、取消点赞==', this.newsStatusOfUser?.likeStatus, this.interactData?.likeNum) | 115 | console.log(TAG, '点赞、取消点赞==', this.newsStatusOfUser?.likeStatus, this.interactData?.likeNum) |
| 83 | // this.queryContentInteractCount() | 116 | // this.queryContentInteractCount() |
| @@ -112,8 +145,12 @@ export struct PlayerRightView { | @@ -112,8 +145,12 @@ export struct PlayerRightView { | ||
| 112 | // this.queryContentInteractCount() | 145 | // this.queryContentInteractCount() |
| 113 | if (this.newsStatusOfUser.collectStatus === 1) { | 146 | if (this.newsStatusOfUser.collectStatus === 1) { |
| 114 | this.interactData.collectNum = Number(this.interactData.collectNum || 0) + 1 | 147 | this.interactData.collectNum = Number(this.interactData.collectNum || 0) + 1 |
| 148 | + TrackingContent.collect(true,this.PageName,this.PageName,this.pageParam) | ||
| 149 | + console.log(TAG, '收藏') | ||
| 115 | } else { | 150 | } else { |
| 116 | this.interactData.collectNum = Math.max(0, Number(this.interactData.collectNum || 0) - 1) | 151 | this.interactData.collectNum = Math.max(0, Number(this.interactData.collectNum || 0) - 1) |
| 152 | + TrackingContent.collect(false,this.PageName,this.PageName,this.pageParam) | ||
| 153 | + console.log(TAG, '取消收藏') | ||
| 117 | } | 154 | } |
| 118 | console.log(TAG, '收藏、取消收藏==', this.newsStatusOfUser?.collectStatus, this.interactData?.collectNum) | 155 | console.log(TAG, '收藏、取消收藏==', this.newsStatusOfUser?.collectStatus, this.interactData?.collectNum) |
| 119 | } | 156 | } |
| @@ -175,6 +212,8 @@ export struct PlayerRightView { | @@ -175,6 +212,8 @@ export struct PlayerRightView { | ||
| 175 | ToastUtils.showToast(res.data.ruleName + '+' + res.data.rulePoint + '积分', 1000); | 212 | ToastUtils.showToast(res.data.ruleName + '+' + res.data.rulePoint + '积分', 1000); |
| 176 | } | 213 | } |
| 177 | }) | 214 | }) |
| 215 | + console.log(TAG, '关注号主') | ||
| 216 | + TrackingContent.follow(true,this.followUserId,this.followUserName,TrackConstants.PageName.Atlas_Detail,TrackConstants.PageName.Atlas_Detail,this.pageParam) | ||
| 178 | } | 217 | } |
| 179 | }) | 218 | }) |
| 180 | } | 219 | } |
| @@ -3,6 +3,7 @@ import { TrackConstants } from "../common/TrackConstants" | @@ -3,6 +3,7 @@ import { TrackConstants } from "../common/TrackConstants" | ||
| 3 | import { TrackingUtils } from '../common/TrackingUtils' | 3 | import { TrackingUtils } from '../common/TrackingUtils' |
| 4 | import { Tracking } from './Tracking' | 4 | import { Tracking } from './Tracking' |
| 5 | import { PointerMatrix } from '@kit.TestKit' | 5 | import { PointerMatrix } from '@kit.TestKit' |
| 6 | +import { StringUtils } from 'wdKit/Index' | ||
| 6 | 7 | ||
| 7 | export class TrackingContent { | 8 | export class TrackingContent { |
| 8 | 9 | ||
| @@ -86,10 +87,10 @@ export class TrackingContent { | @@ -86,10 +87,10 @@ export class TrackingContent { | ||
| 86 | } | 87 | } |
| 87 | 88 | ||
| 88 | static commentClick(pageId: string, pageName: string, extParams?: ParamType) { | 89 | static commentClick(pageId: string, pageName: string, extParams?: ParamType) { |
| 89 | - TrackingContent.commentClickWithEvent("content_comment_click",pageId,pageName,extParams); | 90 | + TrackingContent.clickWithEventAction("content_comment_click",pageId,pageName,TrackConstants.ActionType.Comment,extParams); |
| 90 | } | 91 | } |
| 91 | 92 | ||
| 92 | - static commentClickWithEvent(event: string,pageId: string, pageName: string, extParams?: ParamType) { | 93 | + static clickWithEventAction(event: string,pageId: string, pageName: string,action: string, extParams?: ParamType) { |
| 93 | let params = TrackingUtils.generateParams(extParams) | 94 | let params = TrackingUtils.generateParams(extParams) |
| 94 | if (pageId.length) { | 95 | if (pageId.length) { |
| 95 | params["pageId"] = pageId | 96 | params["pageId"] = pageId |
| @@ -97,11 +98,17 @@ export class TrackingContent { | @@ -97,11 +98,17 @@ export class TrackingContent { | ||
| 97 | if (pageName.length) { | 98 | if (pageName.length) { |
| 98 | params["pageName"] = pageName | 99 | params["pageName"] = pageName |
| 99 | } | 100 | } |
| 100 | - params["action"] =TrackConstants.ActionType.Comment | 101 | + if(!StringUtils.isEmpty(action)){ |
| 102 | + params["action"] =action | ||
| 103 | + } | ||
| 101 | TrackingUtils.fillPositionWith(params) | 104 | TrackingUtils.fillPositionWith(params) |
| 102 | Tracking.event(event, params) | 105 | Tracking.event(event, params) |
| 103 | } | 106 | } |
| 104 | 107 | ||
| 108 | + static clickWithEvent(event: string,pageId: string, pageName: string,extParams?: ParamType) { | ||
| 109 | + TrackingContent.clickWithEventAction(event,pageId,pageName,'',extParams); | ||
| 110 | + } | ||
| 111 | + | ||
| 105 | static commentShare(pageId: string, pageName: string, extParams?: ParamType) { | 112 | static commentShare(pageId: string, pageName: string, extParams?: ParamType) { |
| 106 | 113 | ||
| 107 | } | 114 | } |
-
Please register or login to post a comment