liyubing

Merge remote-tracking branch 'origin/main'

@@ -27,6 +27,7 @@ export struct Card5Component { @@ -27,6 +27,7 @@ export struct Card5Component {
27 @State str03: string = ''; 27 @State str03: string = '';
28 28
29 async aboutToAppear(): Promise<void> { 29 async aboutToAppear(): Promise<void> {
  30 + console.log('Card2Component', JSON.stringify(this.compDTO))
30 this.clicked = hasClicked(this.contentDTO.objectId) 31 this.clicked = hasClicked(this.contentDTO.objectId)
31 this.loadImg = await onlyWifiLoadImg(); 32 this.loadImg = await onlyWifiLoadImg();
32 33
@@ -47,9 +48,9 @@ export struct Card5Component { @@ -47,9 +48,9 @@ export struct Card5Component {
47 Image(this.loadImg ? this.contentDTO.coverUrl : '') 48 Image(this.loadImg ? this.contentDTO.coverUrl : '')
48 .backgroundColor(0xf5f5f5) 49 .backgroundColor(0xf5f5f5)
49 .width(CommonConstants.FULL_WIDTH) 50 .width(CommonConstants.FULL_WIDTH)
50 - .autoResize(true)  
51 .borderRadius($r('app.float.image_border_radius')) 51 .borderRadius($r('app.float.image_border_radius'))
52 - if (this.titleShowPolicy === 1 || this.titleShowPolicy === null) { 52 + .aspectRatio(343 / 225)
  53 + if (this.titleShowPolicy === 1 || this.titleShowPolicy === null || this.titleShowPolicy === '') {
53 Row() 54 Row()
54 .width(CommonConstants.FULL_WIDTH) 55 .width(CommonConstants.FULL_WIDTH)
55 .height(59) 56 .height(59)
@@ -5,9 +5,11 @@ import { MineAppointmentItem } from '../../../viewmodel/MineAppointmentItem'; @@ -5,9 +5,11 @@ import { MineAppointmentItem } from '../../../viewmodel/MineAppointmentItem';
5 import { LazyDataSource, StringUtils } from 'wdKit'; 5 import { LazyDataSource, StringUtils } from 'wdKit';
6 import MinePageDatasModel from '../../../model/MinePageDatasModel'; 6 import MinePageDatasModel from '../../../model/MinePageDatasModel';
7 import { EmptyComponent } from '../../view/EmptyComponent'; 7 import { EmptyComponent } from '../../view/EmptyComponent';
8 -import { Action } from 'wdBean/Index'; 8 +import { Action, ContentDTO } from 'wdBean/Index';
9 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; 9 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
10 import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh'; 10 import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh';
  11 +import { TrackingContent, TrackConstants, TrackParamConvert, ParamType } from 'wdTracking/Index';
  12 +import { TrackingUtils } from 'wdTracking/src/main/ets/common/TrackingUtils';
11 13
12 const TAG = "AppointmentListUI" 14 const TAG = "AppointmentListUI"
13 15
@@ -77,7 +79,9 @@ export struct AppointmentListUI { @@ -77,7 +79,9 @@ export struct AppointmentListUI {
77 AppointmentListChildComponent({ item: item }) 79 AppointmentListChildComponent({ item: item })
78 } 80 }
79 .onClick(() => { 81 .onClick(() => {
80 - //TODO 跳转 82 + let contentDTO = getParams(item)
  83 + TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.PageName.My_Saved_Live,TrackConstants.PageName.My_Saved_Live,TrackParamConvert.program(contentDTO))
  84 +
81 let action = { 85 let action = {
82 type:"2", 86 type:"2",
83 params:{ 87 params:{
@@ -90,6 +94,12 @@ export struct AppointmentListUI { @@ -90,6 +94,12 @@ export struct AppointmentListUI {
90 } as Action 94 } as Action
91 WDRouterRule.jumpWithPage(WDRouterPage.detailPlayLiveCommon, action) 95 WDRouterRule.jumpWithPage(WDRouterPage.detailPlayLiveCommon, action)
92 }) 96 })
  97 + .onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => {
  98 + if (isVisible) {
  99 + let contentDTO = getParams(item)
  100 + TrackingContent.common(TrackConstants.EventType.Show, TrackConstants.PageName.My_Saved_Live,TrackConstants.PageName.My_Saved_Live, TrackParamConvert.program(contentDTO))
  101 + }
  102 + })
93 }, (item: MineAppointmentItem, index: number) => index.toString()) 103 }, (item: MineAppointmentItem, index: number) => index.toString())
94 104
95 //没有更多数据 显示提示 105 //没有更多数据 显示提示
@@ -175,4 +185,15 @@ export struct AppointmentListUI { @@ -175,4 +185,15 @@ export struct AppointmentListUI {
175 console.log(TAG, JSON.stringify(dealData)) 185 console.log(TAG, JSON.stringify(dealData))
176 return dealData 186 return dealData
177 } 187 }
178 -}  
  188 +}
  189 +
  190 + function getParams(item: MineAppointmentItem) : ContentDTO{
  191 + let contentDTO = new ContentDTO();
  192 +
  193 + contentDTO.objectType = item.relType + ""
  194 + contentDTO.objectId = item.liveId + ""
  195 + contentDTO.newsTitle = item.title
  196 + // contentDTO.channelId =
  197 + // contentDTO.rmhPlatform
  198 + return contentDTO
  199 + }
@@ -5,6 +5,7 @@ import MinePageDatasModel from '../../../model/MinePageDatasModel' @@ -5,6 +5,7 @@ import MinePageDatasModel from '../../../model/MinePageDatasModel'
5 import { CommentLikeOperationRequestItem } from '../../../viewmodel/CommentLikeOperationRequestItem' 5 import { CommentLikeOperationRequestItem } from '../../../viewmodel/CommentLikeOperationRequestItem'
6 import { CommentListItem } from '../../../viewmodel/CommentListItem' 6 import { CommentListItem } from '../../../viewmodel/CommentListItem'
7 import measure from '@ohos.measure' 7 import measure from '@ohos.measure'
  8 +import { TrackingContent, TrackConstants, TrackParamConvert } from 'wdTracking/Index'
8 9
9 @Component 10 @Component
10 export struct ChildCommentComponent { 11 export struct ChildCommentComponent {
@@ -16,6 +17,7 @@ export struct ChildCommentComponent { @@ -16,6 +17,7 @@ export struct ChildCommentComponent {
16 @State isOverLines: boolean = false 17 @State isOverLines: boolean = false
17 @State isOverLinesParent: boolean = false 18 @State isOverLinesParent: boolean = false
18 testText:string = "1,因为读书的人\n是低着头向上看的人\n身处一隅,却能放眼世界\n2,因为读书的人\n总是比不读书的人\n活得有趣一点\n3,因为读书的人\n即使平凡,绝不平庸" 19 testText:string = "1,因为读书的人\n是低着头向上看的人\n身处一隅,却能放眼世界\n2,因为读书的人\n总是比不读书的人\n活得有趣一点\n3,因为读书的人\n即使平凡,绝不平庸"
  20 + @Link fromPage:number
19 21
20 build() { 22 build() {
21 Column() { 23 Column() {
@@ -195,11 +197,12 @@ export struct ChildCommentComponent { @@ -195,11 +197,12 @@ export struct ChildCommentComponent {
195 }.height('69lpx') 197 }.height('69lpx')
196 .justifyContent(FlexAlign.Center) 198 .justifyContent(FlexAlign.Center)
197 .onClick(() => { 199 .onClick(() => {
198 - let content = new ContentDTO()  
199 - content.objectId = this.data.targetId;  
200 - content.relType = this.data.targetRelType + "";  
201 - content.relId = this.data.targetRelId;  
202 - content.objectType = this.data.targetType + ""; 200 + let content = getParams(this.data)
  201 + if(this.fromPage === 0 ){
  202 + TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.PageName.Main_Personal,TrackConstants.PageName.Main_Personal,TrackParamConvert.program(content))
  203 + }else{
  204 + TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.PageName.Customer_Personal,TrackConstants.PageName.Customer_Personal,TrackParamConvert.program(content))
  205 + }
203 ProcessUtils.processPage(content) 206 ProcessUtils.processPage(content)
204 }) 207 })
205 } 208 }
@@ -284,3 +287,20 @@ function textStyle() { @@ -284,3 +287,20 @@ function textStyle() {
284 .lineHeight('46lpx') 287 .lineHeight('46lpx')
285 } 288 }
286 289
  290 +function getParams(item: CommentListItem) : ContentDTO{
  291 + let contentDTO = new ContentDTO();
  292 +
  293 + // contentDTO.objectType = item.targetType + ""
  294 + // contentDTO.objectId = item.targetId + ""
  295 + // contentDTO.newsTitle = item.targetTitle
  296 + // contentDTO.channelId =
  297 + // contentDTO.rmhPlatform =
  298 +
  299 + contentDTO.objectId = item.targetId;
  300 + contentDTO.relType = item.targetRelType + "";
  301 + contentDTO.relId = item.targetRelId;
  302 + contentDTO.objectType = item.targetType + "";
  303 + contentDTO.newsTitle = item.targetTitle
  304 +
  305 + return contentDTO
  306 +}
@@ -8,6 +8,8 @@ import { ChildCommentComponent } from './ChildCommentComponent'; @@ -8,6 +8,8 @@ import { ChildCommentComponent } from './ChildCommentComponent';
8 import { MineCommentListDetailItem } from '../../../viewmodel/MineCommentListDetailItem'; 8 import { MineCommentListDetailItem } from '../../../viewmodel/MineCommentListDetailItem';
9 import { OtherUserCommentLikeStatusRequestItem } from '../../../viewmodel/OtherUserCommentLikeStatusRequestItem'; 9 import { OtherUserCommentLikeStatusRequestItem } from '../../../viewmodel/OtherUserCommentLikeStatusRequestItem';
10 import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh'; 10 import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh';
  11 +import { ContentDTO } from 'wdBean/Index';
  12 +import { TrackingContent, TrackConstants, TrackParamConvert } from 'wdTracking/Index';
11 13
12 const TAG = "HomePageBottomCommentComponent" 14 const TAG = "HomePageBottomCommentComponent"
13 15
@@ -83,9 +85,15 @@ export struct HomePageBottomCommentComponent { @@ -83,9 +85,15 @@ export struct HomePageBottomCommentComponent {
83 ChildCommentComponent({ 85 ChildCommentComponent({
84 data: item, 86 data: item,
85 levelHead: UserDataLocal.getUserLevelHeaderUrl(), 87 levelHead: UserDataLocal.getUserLevelHeaderUrl(),
86 - isLastItem: index === this.data_comment.totalCount() - 1 88 + isLastItem: index === this.data_comment.totalCount() - 1,
  89 + fromPage:0
87 }) 90 })
88 - } 91 + }.onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => {
  92 + if (isVisible) {
  93 + let contentDTO = getParams(item)
  94 + TrackingContent.common(TrackConstants.EventType.Show, TrackConstants.PageName.Main_Personal,TrackConstants.PageName.Main_Personal, TrackParamConvert.program(contentDTO))
  95 + }
  96 + })
89 }, (item: CommentListItem, index: number) => index.toString()) 97 }, (item: CommentListItem, index: number) => index.toString())
90 98
91 //没有更多数据 显示提示 99 //没有更多数据 显示提示
@@ -217,4 +225,23 @@ export struct HomePageBottomCommentComponent { @@ -217,4 +225,23 @@ export struct HomePageBottomCommentComponent {
217 this.isGetRequest = true 225 this.isGetRequest = true
218 }) 226 })
219 } 227 }
220 -}  
  228 +}
  229 +
  230 +
  231 +function getParams(item: CommentListItem) : ContentDTO{
  232 + let contentDTO = new ContentDTO();
  233 +
  234 + // contentDTO.objectType = item.targetType + ""
  235 + // contentDTO.objectId = item.targetId + ""
  236 + // contentDTO.newsTitle = item.targetTitle
  237 + // contentDTO.channelId =
  238 + // contentDTO.rmhPlatform =
  239 +
  240 + contentDTO.objectId = item.targetId;
  241 + contentDTO.relType = item.targetRelType + "";
  242 + contentDTO.relId = item.targetRelId;
  243 + contentDTO.objectType = item.targetType + "";
  244 + contentDTO.newsTitle = item.targetTitle
  245 +
  246 + return contentDTO
  247 +}
@@ -8,6 +8,8 @@ import { OtherUserCommentLikeStatusRequestItem } from '../../../viewmodel/OtherU @@ -8,6 +8,8 @@ import { OtherUserCommentLikeStatusRequestItem } from '../../../viewmodel/OtherU
8 import { ChildCommentComponent } from './ChildCommentComponent'; 8 import { ChildCommentComponent } from './ChildCommentComponent';
9 import { EmptyComponent } from '../../view/EmptyComponent'; 9 import { EmptyComponent } from '../../view/EmptyComponent';
10 import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh'; 10 import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh';
  11 +import { ContentDTO } from 'wdBean/Index';
  12 +import { TrackingContent, TrackConstants, TrackParamConvert } from 'wdTracking/Index';
11 13
12 const TAG = "HomePageBottomComponent" 14 const TAG = "HomePageBottomComponent"
13 /** 15 /**
@@ -84,9 +86,15 @@ export struct OtherHomePageBottomCommentComponent { @@ -84,9 +86,15 @@ export struct OtherHomePageBottomCommentComponent {
84 ChildCommentComponent({ 86 ChildCommentComponent({
85 data: item, 87 data: item,
86 levelHead: this.levelHead, 88 levelHead: this.levelHead,
87 - isLastItem: index === this.data_comment.totalCount() - 1 89 + isLastItem: index === this.data_comment.totalCount() - 1,
  90 + fromPage:1
88 }) 91 })
89 - } 92 + }.onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => {
  93 + if (isVisible) {
  94 + let contentDTO = getParams(item)
  95 + TrackingContent.common(TrackConstants.EventType.Show, TrackConstants.PageName.Customer_Personal,TrackConstants.PageName.Customer_Personal, TrackParamConvert.program(contentDTO))
  96 + }
  97 + })
90 }, (item: CommentListItem, index: number) => index.toString()) 98 }, (item: CommentListItem, index: number) => index.toString())
91 99
92 //没有更多数据 显示提示 100 //没有更多数据 显示提示
@@ -214,4 +222,22 @@ export struct OtherHomePageBottomCommentComponent { @@ -214,4 +222,22 @@ export struct OtherHomePageBottomCommentComponent {
214 this.isGetRequest = true 222 this.isGetRequest = true
215 }) 223 })
216 } 224 }
217 -}  
  225 +}
  226 +
  227 +function getParams(item: CommentListItem) : ContentDTO{
  228 + let contentDTO = new ContentDTO();
  229 +
  230 + // contentDTO.objectType = item.targetType + ""
  231 + // contentDTO.objectId = item.targetId + ""
  232 + // contentDTO.newsTitle = item.targetTitle
  233 + // contentDTO.channelId =
  234 + // contentDTO.rmhPlatform =
  235 +
  236 + contentDTO.objectId = item.targetId;
  237 + contentDTO.relType = item.targetRelType + "";
  238 + contentDTO.relId = item.targetRelId;
  239 + contentDTO.objectType = item.targetType + "";
  240 + contentDTO.newsTitle = item.targetTitle
  241 +
  242 + return contentDTO
  243 +}
@@ -8,10 +8,11 @@ export struct PeopleShipHomeAttentionComponent { @@ -8,10 +8,11 @@ export struct PeopleShipHomeAttentionComponent {
8 Flex({ alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { 8 Flex({ alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
9 Button({type: ButtonType.Normal, stateEffect: false } ) { 9 Button({type: ButtonType.Normal, stateEffect: false } ) {
10 Stack() { 10 Stack() {
11 - Image(this.isAttention == '0'? $r('app.media.home_attention_no_left') : $r('app.media.home_attention_left')) 11 + Row()
12 .width('100%') 12 .width('100%')
13 .height('100%') 13 .height('100%')
14 - .objectFit(ImageFit.Cover) 14 + .backgroundColor(this.isAttention == '0'? $r('app.color.color_ED2800') : $r('app.color.color_F5F5F5'))
  15 + .borderRadius("5lpx")
15 Row() { 16 Row() {
16 if(this.isAttention == '0') { 17 if(this.isAttention == '0') {
17 if(this.isLoadingAttention) { 18 if(this.isLoadingAttention) {