张善主

Merge remote-tracking branch 'origin/main'

@@ -21,7 +21,7 @@ export enum HostEnum { @@ -21,7 +21,7 @@ export enum HostEnum {
21 * 环境host管理工具类 21 * 环境host管理工具类
22 */ 22 */
23 export class HostManager { 23 export class HostManager {
24 - private static _hostUrl: HostEnum = HostEnum.HOST_UAT; 24 + private static _hostUrl: HostEnum = HostEnum.HOST_PRODUCT;
25 25
26 static changeHost(host: HostEnum) { 26 static changeHost(host: HostEnum) {
27 HostManager._hostUrl = host; 27 HostManager._hostUrl = host;
@@ -7,6 +7,7 @@ import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailView @@ -7,6 +7,7 @@ import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailView
7 import { SpConstants } from 'wdConstant/Index'; 7 import { SpConstants } from 'wdConstant/Index';
8 import { WDShare } from 'wdShare/Index'; 8 import { WDShare } from 'wdShare/Index';
9 import { LikeComponent } from './view/LikeComponent' 9 import { LikeComponent } from './view/LikeComponent'
  10 +import { TrackConstants } from 'wdTracking/Index';
10 11
11 const TAG = 'CarderInteraction' 12 const TAG = 'CarderInteraction'
12 13
@@ -22,6 +23,8 @@ export struct CarderInteraction { @@ -22,6 +23,8 @@ export struct CarderInteraction {
22 @State likeBean: Record<string, string> = {} 23 @State likeBean: Record<string, string> = {}
23 @State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 24 @State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
24 @State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以 25 @State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以
  26 + @Provide pageName: string = TrackConstants.PageName.DynamicDetail
  27 + @Provide pageId: string = TrackConstants.PageName.DynamicDetail
25 28
26 async aboutToAppear() { 29 async aboutToAppear() {
27 await this.getContentDetailData() 30 await this.getContentDetailData()
@@ -33,7 +33,8 @@ export struct LikeComponent { @@ -33,7 +33,8 @@ export struct LikeComponent {
33 styleType: number = 1 //1: 白色背景(图文底部栏) 2: 黑色背景(图集底部栏) 3 透明背景 33 styleType: number = 1 //1: 白色背景(图文底部栏) 2: 黑色背景(图集底部栏) 3 透明背景
34 @State likeCount: number = 0 //点赞数 34 @State likeCount: number = 0 //点赞数
35 pageParam: ParamType = {} 35 pageParam: ParamType = {}
36 - PageName: string = '' 36 + @Consume pageName: string
  37 + @Consume pageId: string
37 38
38 //上层传值 样例 39 //上层传值 样例
39 // this.data['contentId'] = '30035444649' //必须 40 // this.data['contentId'] = '30035444649' //必须
@@ -81,19 +82,6 @@ export struct LikeComponent { @@ -81,19 +82,6 @@ export struct LikeComponent {
81 'contentId': `${this.contentDetailData.newsId}`, 82 'contentId': `${this.contentDetailData.newsId}`,
82 'contentName': `${this.contentDetailData.newsTitle || ''}`, 83 'contentName': `${this.contentDetailData.newsTitle || ''}`,
83 } 84 }
84 - if(this.contentDetailData.newsType == 1) {  
85 - this.PageName = TrackConstants.PageName.VideoDetail // 点播  
86 - } else if(this.contentDetailData.newsType == 2) {  
87 - this.PageName = TrackConstants.PageName.Live_Detail // 直播  
88 - } else if(this.contentDetailData.newsType == 5) {  
89 - this.PageName = TrackConstants.PageName.Summary_Detail // 专题详情页  
90 - } else if(this.contentDetailData.newsType == 8) {  
91 - this.PageName = TrackConstants.PageName.Article_Detail // 图文详情页  
92 - } else if(this.contentDetailData.newsType == 9) {  
93 - this.PageName = TrackConstants.PageName.Atlas_Detail // 图集详情页  
94 - } else if(this.contentDetailData.newsType == 14 || this.contentDetailData.newsType == 15) {  
95 - this.PageName = TrackConstants.PageName.DynamicDetail // 动态图文/动态视频  
96 - }  
97 } 85 }
98 86
99 build() { 87 build() {
@@ -378,16 +366,16 @@ export struct LikeComponent { @@ -378,16 +366,16 @@ export struct LikeComponent {
378 if (this.contentDetailData.liveInfo) { 366 if (this.contentDetailData.liveInfo) {
379 this.likeStatus = true 367 this.likeStatus = true
380 this.likeCount++ 368 this.likeCount++
381 - TrackingContent.like(true,this.PageName,this.PageName,this.pageParam) 369 + TrackingContent.like(true,this.pageId,this.pageName,this.pageParam)
382 } else { 370 } else {
383 this.likeStatus = !this.likeStatus 371 this.likeStatus = !this.likeStatus
384 //点赞和取消点赞成功后更新点赞数 372 //点赞和取消点赞成功后更新点赞数
385 if (this.likeStatus) { 373 if (this.likeStatus) {
386 this.likeCount++ 374 this.likeCount++
387 - TrackingContent.like(true,this.PageName,this.PageName,this.pageParam) 375 + TrackingContent.like(true,this.pageId,this.pageName,this.pageParam)
388 } else { 376 } else {
389 this.likeCount-- 377 this.likeCount--
390 - TrackingContent.like(false,this.PageName,this.PageName,this.pageParam) 378 + TrackingContent.like(false,this.pageId,this.pageName,this.pageParam)
391 } 379 }
392 } 380 }
393 381
@@ -29,7 +29,6 @@ export struct LiveLikeComponent { @@ -29,7 +29,6 @@ export struct LiveLikeComponent {
29 @State likeCount: number = 0 //点赞数 29 @State likeCount: number = 0 //点赞数
30 @State likeBean: Record<string, string> = {} 30 @State likeBean: Record<string, string> = {}
31 pageParam: ParamType = {} 31 pageParam: ParamType = {}
32 - PageName: string = ''  
33 32
34 //上层传值 样例 33 //上层传值 样例
35 // this.data['contentId'] = '30035444649' //必须 34 // this.data['contentId'] = '30035444649' //必须
@@ -66,9 +65,6 @@ export struct LiveLikeComponent { @@ -66,9 +65,6 @@ export struct LiveLikeComponent {
66 'contentId': `${this.contentDetailData.newsId}`, 65 'contentId': `${this.contentDetailData.newsId}`,
67 'contentName': `${this.contentDetailData.newsTitle || ''}`, 66 'contentName': `${this.contentDetailData.newsTitle || ''}`,
68 } 67 }
69 - if (this.contentDetailData.newsType == 2) {  
70 - this.PageName = TrackConstants.PageName.Live_Detail // 直播  
71 - }  
72 } 68 }
73 69
74 build() { 70 build() {
@@ -64,7 +64,8 @@ export struct LiveOperRowListView { @@ -64,7 +64,8 @@ export struct LiveOperRowListView {
64 @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 64 @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
65 @State dialogController: CustomDialogController | null = null; 65 @State dialogController: CustomDialogController | null = null;
66 pageParam: ParamType = {} 66 pageParam: ParamType = {}
67 - PageName: string = '' 67 + @Consume pageName: string
  68 + @Consume pageId: string
68 @State likesStyle: number | string = "love" // 点赞样式 love爱心型 thumb点赞手势 mourning 蜡烛(默哀) pray 祈福 69 @State likesStyle: number | string = "love" // 点赞样式 love爱心型 thumb点赞手势 mourning 蜡烛(默哀) pray 祈福
69 @State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以 70 @State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以
70 71
@@ -88,9 +89,6 @@ export struct LiveOperRowListView { @@ -88,9 +89,6 @@ export struct LiveOperRowListView {
88 'contentId': `${this.contentDetailData.newsId}`, 89 'contentId': `${this.contentDetailData.newsId}`,
89 'contentName': `${this.contentDetailData.newsTitle || ''}`, 90 'contentName': `${this.contentDetailData.newsTitle || ''}`,
90 } 91 }
91 - if(this.contentDetailData.newsType == 2) {  
92 - this.PageName = TrackConstants.PageName.Live_Detail // 直播  
93 - }  
94 } 92 }
95 93
96 async onDetailUpdated() { 94 async onDetailUpdated() {
@@ -425,9 +423,9 @@ export struct LiveOperRowListView { @@ -425,9 +423,9 @@ export struct LiveOperRowListView {
425 this.newsStatusOfUser.collectStatus = this.newsStatusOfUser?.collectStatus === 1 ? 0 : 1 423 this.newsStatusOfUser.collectStatus = this.newsStatusOfUser?.collectStatus === 1 ? 0 : 1
426 if (this.newsStatusOfUser.collectStatus === 1) { 424 if (this.newsStatusOfUser.collectStatus === 1) {
427 promptAction.showToast({ message: '收藏成功' }) 425 promptAction.showToast({ message: '收藏成功' })
428 - TrackingContent.collect(true,this.PageName,this.PageName,this.pageParam) 426 + TrackingContent.collect(true,this.pageId,this.pageName,this.pageParam)
429 } else { 427 } else {
430 - TrackingContent.collect(false,this.PageName,this.PageName,this.pageParam) 428 + TrackingContent.collect(false,this.pageId,this.pageName,this.pageParam)
431 } 429 }
432 this.queryContentInteractCount() 430 this.queryContentInteractCount()
433 } 431 }
@@ -89,7 +89,8 @@ export struct OperRowListView { @@ -89,7 +89,8 @@ export struct OperRowListView {
89 @State name: string = 'audio_recommend_status_wait' 89 @State name: string = 'audio_recommend_status_wait'
90 @State dialogController: CustomDialogController | null = null; 90 @State dialogController: CustomDialogController | null = null;
91 pageParam: ParamType = {} 91 pageParam: ParamType = {}
92 - PageName: string = '' 92 + @Consume pageName: string
  93 + @Consume pageId: string
93 @State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 94 @State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
94 @State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以 95 @State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以
95 96
@@ -119,19 +120,6 @@ export struct OperRowListView { @@ -119,19 +120,6 @@ export struct OperRowListView {
119 'contentId': `${this.contentDetailData.newsId}`, 120 'contentId': `${this.contentDetailData.newsId}`,
120 'contentName': `${this.contentDetailData.newsTitle || ''}`, 121 'contentName': `${this.contentDetailData.newsTitle || ''}`,
121 } 122 }
122 - if(this.contentDetailData.newsType == 1) {  
123 - this.PageName = TrackConstants.PageName.VideoDetail // 点播  
124 - } else if(this.contentDetailData.newsType == 2) {  
125 - this.PageName = TrackConstants.PageName.Live_Detail // 直播  
126 - } else if(this.contentDetailData.newsType == 5) {  
127 - this.PageName = TrackConstants.PageName.Summary_Detail // 专题详情页  
128 - } else if(this.contentDetailData.newsType == 8) {  
129 - this.PageName = TrackConstants.PageName.Article_Detail // 图文详情页  
130 - } else if(this.contentDetailData.newsType == 9) {  
131 - this.PageName = TrackConstants.PageName.Atlas_Detail // 图集详情页  
132 - } else if(this.contentDetailData.newsType == 14 || this.contentDetailData.newsType == 15) {  
133 - this.PageName = TrackConstants.PageName.DynamicDetail // 动态图文/动态视频  
134 - }  
135 } 123 }
136 124
137 async onDetailUpdated() { 125 async onDetailUpdated() {
@@ -376,7 +364,7 @@ export struct OperRowListView { @@ -376,7 +364,7 @@ export struct OperRowListView {
376 TapGesture() 364 TapGesture()
377 .onAction((event: GestureEvent) => { 365 .onAction((event: GestureEvent) => {
378 this.AudioSuspension.setPlayerUrl(this.audioUrl, this.audioTitle) 366 this.AudioSuspension.setPlayerUrl(this.audioUrl, this.audioTitle)
379 - TrackingButton.click('suspendedWindow',this.PageName,this.PageName) 367 + TrackingButton.click('suspendedWindow',this.pageId,this.pageName)
380 })) 368 }))
381 } 369 }
382 .height(36) 370 .height(36)
@@ -473,9 +461,9 @@ export struct OperRowListView { @@ -473,9 +461,9 @@ export struct OperRowListView {
473 this.newsStatusOfUser.collectStatus = this.newsStatusOfUser?.collectStatus === 1 ? 0 : 1 461 this.newsStatusOfUser.collectStatus = this.newsStatusOfUser?.collectStatus === 1 ? 0 : 1
474 if (this.newsStatusOfUser.collectStatus === 1) { 462 if (this.newsStatusOfUser.collectStatus === 1) {
475 promptAction.showToast({ message: '收藏成功' }) 463 promptAction.showToast({ message: '收藏成功' })
476 - TrackingContent.collect(true,this.PageName,this.PageName,this.pageParam) 464 + TrackingContent.collect(true,this.pageId,this.pageName,this.pageParam)
477 } else { 465 } else {
478 - TrackingContent.collect(false,this.PageName,this.PageName,this.pageParam) 466 + TrackingContent.collect(false,this.pageId,this.pageName,this.pageParam)
479 } 467 }
480 this.queryContentInteractCount() 468 this.queryContentInteractCount()
481 } 469 }
@@ -41,7 +41,8 @@ export struct PlayerRightView { @@ -41,7 +41,8 @@ export struct PlayerRightView {
41 @State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 41 @State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
42 @State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以 42 @State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以
43 pageParam: ParamType = {} 43 pageParam: ParamType = {}
44 - PageName: string = '' 44 + @Consume pageName: string
  45 + @Consume pageId: string
45 followUserId: string = '' 46 followUserId: string = ''
46 followUserName: string = '' 47 followUserName: string = ''
47 48
@@ -59,19 +60,6 @@ export struct PlayerRightView { @@ -59,19 +60,6 @@ export struct PlayerRightView {
59 'contentId': `${this.contentDetailData.newsId}`, 60 'contentId': `${this.contentDetailData.newsId}`,
60 'contentName': `${this.contentDetailData.newsTitle || ''}`, 61 'contentName': `${this.contentDetailData.newsTitle || ''}`,
61 } 62 }
62 - if(this.contentDetailData.newsType == 1) {  
63 - this.PageName = TrackConstants.PageName.VideoDetail // 点播  
64 - } else if(this.contentDetailData.newsType == 2) {  
65 - this.PageName = TrackConstants.PageName.Live_Detail // 直播  
66 - } else if(this.contentDetailData.newsType == 5) {  
67 - this.PageName = TrackConstants.PageName.Summary_Detail // 专题详情页  
68 - } else if(this.contentDetailData.newsType == 8) {  
69 - this.PageName = TrackConstants.PageName.Article_Detail // 图文详情页  
70 - } else if(this.contentDetailData.newsType == 9) {  
71 - this.PageName = TrackConstants.PageName.Atlas_Detail // 图集详情页  
72 - } else if(this.contentDetailData.newsType == 14 || this.contentDetailData.newsType == 15) {  
73 - this.PageName = TrackConstants.PageName.DynamicDetail // 动态图文/动态视频  
74 - }  
75 this.followUserId = this.contentDetailData?.rmhInfo?.rmhId || '' 63 this.followUserId = this.contentDetailData?.rmhInfo?.rmhId || ''
76 this.followUserName = this.contentDetailData?.rmhInfo?.rmhName || '' 64 this.followUserName = this.contentDetailData?.rmhInfo?.rmhName || ''
77 } 65 }
@@ -104,11 +92,11 @@ export struct PlayerRightView { @@ -104,11 +92,11 @@ export struct PlayerRightView {
104 this.newsStatusOfUser.likeStatus = this.newsStatusOfUser?.likeStatus == '1' ? '0' : '1' 92 this.newsStatusOfUser.likeStatus = this.newsStatusOfUser?.likeStatus == '1' ? '0' : '1'
105 if (this.newsStatusOfUser.likeStatus == '1') { 93 if (this.newsStatusOfUser.likeStatus == '1') {
106 this.interactData.likeNum = Number(this.interactData.likeNum || 0) + 1 94 this.interactData.likeNum = Number(this.interactData.likeNum || 0) + 1
107 - TrackingContent.like(true,this.PageName,this.PageName,this.pageParam) 95 + TrackingContent.like(true,this.pageId,this.pageName,this.pageParam)
108 console.log(TAG, '点赞') 96 console.log(TAG, '点赞')
109 } else { 97 } else {
110 this.interactData.likeNum = Math.max(0, Number(this.interactData.likeNum || 0) - 1) 98 this.interactData.likeNum = Math.max(0, Number(this.interactData.likeNum || 0) - 1)
111 - TrackingContent.like(false,this.PageName,this.PageName,this.pageParam) 99 + TrackingContent.like(false,this.pageId,this.pageName,this.pageParam)
112 console.log(TAG, '取消点赞') 100 console.log(TAG, '取消点赞')
113 } 101 }
114 console.log(TAG, '点赞、取消点赞==', this.newsStatusOfUser?.likeStatus, this.interactData?.likeNum) 102 console.log(TAG, '点赞、取消点赞==', this.newsStatusOfUser?.likeStatus, this.interactData?.likeNum)
@@ -144,11 +132,11 @@ export struct PlayerRightView { @@ -144,11 +132,11 @@ export struct PlayerRightView {
144 // this.queryContentInteractCount() 132 // this.queryContentInteractCount()
145 if (this.newsStatusOfUser.collectStatus === 1) { 133 if (this.newsStatusOfUser.collectStatus === 1) {
146 this.interactData.collectNum = Number(this.interactData.collectNum || 0) + 1 134 this.interactData.collectNum = Number(this.interactData.collectNum || 0) + 1
147 - TrackingContent.collect(true,this.PageName,this.PageName,this.pageParam) 135 + TrackingContent.collect(true,this.pageId,this.pageName,this.pageParam)
148 console.log(TAG, '收藏') 136 console.log(TAG, '收藏')
149 } else { 137 } else {
150 this.interactData.collectNum = Math.max(0, Number(this.interactData.collectNum || 0) - 1) 138 this.interactData.collectNum = Math.max(0, Number(this.interactData.collectNum || 0) - 1)
151 - TrackingContent.collect(false,this.PageName,this.PageName,this.pageParam) 139 + TrackingContent.collect(false,this.pageId,this.pageName,this.pageParam)
152 console.log(TAG, '取消收藏') 140 console.log(TAG, '取消收藏')
153 } 141 }
154 console.log(TAG, '收藏、取消收藏==', this.newsStatusOfUser?.collectStatus, this.interactData?.collectNum) 142 console.log(TAG, '收藏、取消收藏==', this.newsStatusOfUser?.collectStatus, this.interactData?.collectNum)
@@ -212,7 +200,7 @@ export struct PlayerRightView { @@ -212,7 +200,7 @@ export struct PlayerRightView {
212 } 200 }
213 }) 201 })
214 console.log(TAG, '关注号主') 202 console.log(TAG, '关注号主')
215 - TrackingContent.follow(true,this.followUserId,this.followUserName,TrackConstants.PageName.Atlas_Detail,TrackConstants.PageName.Atlas_Detail,this.pageParam) 203 + TrackingContent.follow(true,this.followUserId,this.followUserName,this.pageId,this.pageName,this.pageParam)
216 } 204 }
217 }) 205 })
218 } 206 }
@@ -179,7 +179,9 @@ export struct VideoChannelPage { @@ -179,7 +179,9 @@ export struct VideoChannelPage {
179 pageId: item.pageId + '', 179 pageId: item.pageId + '',
180 channelId: item.channelId + '', 180 channelId: item.channelId + '',
181 autoRefresh: this.autoRefresh 181 autoRefresh: this.autoRefresh
182 - }).margin({ top: 40 }) 182 + })
  183 + .margin({ top: 40 })
  184 + .backgroundColor(Color.White)
183 } 185 }
184 }, (item: TopNavDTO) => item.channelId + '') 186 }, (item: TopNavDTO) => item.channelId + '')
185 } 187 }