张善主

Merge remote-tracking branch 'origin/main'

... ... @@ -21,7 +21,7 @@ export enum HostEnum {
* 环境host管理工具类
*/
export class HostManager {
private static _hostUrl: HostEnum = HostEnum.HOST_UAT;
private static _hostUrl: HostEnum = HostEnum.HOST_PRODUCT;
static changeHost(host: HostEnum) {
HostManager._hostUrl = host;
... ...
... ... @@ -7,6 +7,7 @@ import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailView
import { SpConstants } from 'wdConstant/Index';
import { WDShare } from 'wdShare/Index';
import { LikeComponent } from './view/LikeComponent'
import { TrackConstants } from 'wdTracking/Index';
const TAG = 'CarderInteraction'
... ... @@ -22,6 +23,8 @@ export struct CarderInteraction {
@State likeBean: Record<string, string> = {}
@State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
@State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以
@Provide pageName: string = TrackConstants.PageName.DynamicDetail
@Provide pageId: string = TrackConstants.PageName.DynamicDetail
async aboutToAppear() {
await this.getContentDetailData()
... ...
... ... @@ -33,7 +33,8 @@ export struct LikeComponent {
styleType: number = 1 //1: 白色背景(图文底部栏) 2: 黑色背景(图集底部栏) 3 透明背景
@State likeCount: number = 0 //点赞数
pageParam: ParamType = {}
PageName: string = ''
@Consume pageName: string
@Consume pageId: string
//上层传值 样例
// this.data['contentId'] = '30035444649' //必须
... ... @@ -81,19 +82,6 @@ export struct LikeComponent {
'contentId': `${this.contentDetailData.newsId}`,
'contentName': `${this.contentDetailData.newsTitle || ''}`,
}
if(this.contentDetailData.newsType == 1) {
this.PageName = TrackConstants.PageName.VideoDetail // 点播
} else if(this.contentDetailData.newsType == 2) {
this.PageName = TrackConstants.PageName.Live_Detail // 直播
} else if(this.contentDetailData.newsType == 5) {
this.PageName = TrackConstants.PageName.Summary_Detail // 专题详情页
} else if(this.contentDetailData.newsType == 8) {
this.PageName = TrackConstants.PageName.Article_Detail // 图文详情页
} else if(this.contentDetailData.newsType == 9) {
this.PageName = TrackConstants.PageName.Atlas_Detail // 图集详情页
} else if(this.contentDetailData.newsType == 14 || this.contentDetailData.newsType == 15) {
this.PageName = TrackConstants.PageName.DynamicDetail // 动态图文/动态视频
}
}
build() {
... ... @@ -378,16 +366,16 @@ export struct LikeComponent {
if (this.contentDetailData.liveInfo) {
this.likeStatus = true
this.likeCount++
TrackingContent.like(true,this.PageName,this.PageName,this.pageParam)
TrackingContent.like(true,this.pageId,this.pageName,this.pageParam)
} else {
this.likeStatus = !this.likeStatus
//点赞和取消点赞成功后更新点赞数
if (this.likeStatus) {
this.likeCount++
TrackingContent.like(true,this.PageName,this.PageName,this.pageParam)
TrackingContent.like(true,this.pageId,this.pageName,this.pageParam)
} else {
this.likeCount--
TrackingContent.like(false,this.PageName,this.PageName,this.pageParam)
TrackingContent.like(false,this.pageId,this.pageName,this.pageParam)
}
}
... ...
... ... @@ -29,7 +29,6 @@ export struct LiveLikeComponent {
@State likeCount: number = 0 //点赞数
@State likeBean: Record<string, string> = {}
pageParam: ParamType = {}
PageName: string = ''
//上层传值 样例
// this.data['contentId'] = '30035444649' //必须
... ... @@ -66,9 +65,6 @@ export struct LiveLikeComponent {
'contentId': `${this.contentDetailData.newsId}`,
'contentName': `${this.contentDetailData.newsTitle || ''}`,
}
if (this.contentDetailData.newsType == 2) {
this.PageName = TrackConstants.PageName.Live_Detail // 直播
}
}
build() {
... ...
... ... @@ -64,7 +64,8 @@ export struct LiveOperRowListView {
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
@State dialogController: CustomDialogController | null = null;
pageParam: ParamType = {}
PageName: string = ''
@Consume pageName: string
@Consume pageId: string
@State likesStyle: number | string = "love" // 点赞样式 love爱心型 thumb点赞手势 mourning 蜡烛(默哀) pray 祈福
@State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以
... ... @@ -88,9 +89,6 @@ export struct LiveOperRowListView {
'contentId': `${this.contentDetailData.newsId}`,
'contentName': `${this.contentDetailData.newsTitle || ''}`,
}
if(this.contentDetailData.newsType == 2) {
this.PageName = TrackConstants.PageName.Live_Detail // 直播
}
}
async onDetailUpdated() {
... ... @@ -425,9 +423,9 @@ export struct LiveOperRowListView {
this.newsStatusOfUser.collectStatus = this.newsStatusOfUser?.collectStatus === 1 ? 0 : 1
if (this.newsStatusOfUser.collectStatus === 1) {
promptAction.showToast({ message: '收藏成功' })
TrackingContent.collect(true,this.PageName,this.PageName,this.pageParam)
TrackingContent.collect(true,this.pageId,this.pageName,this.pageParam)
} else {
TrackingContent.collect(false,this.PageName,this.PageName,this.pageParam)
TrackingContent.collect(false,this.pageId,this.pageName,this.pageParam)
}
this.queryContentInteractCount()
}
... ...
... ... @@ -89,7 +89,8 @@ export struct OperRowListView {
@State name: string = 'audio_recommend_status_wait'
@State dialogController: CustomDialogController | null = null;
pageParam: ParamType = {}
PageName: string = ''
@Consume pageName: string
@Consume pageId: string
@State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
@State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以
... ... @@ -119,19 +120,6 @@ export struct OperRowListView {
'contentId': `${this.contentDetailData.newsId}`,
'contentName': `${this.contentDetailData.newsTitle || ''}`,
}
if(this.contentDetailData.newsType == 1) {
this.PageName = TrackConstants.PageName.VideoDetail // 点播
} else if(this.contentDetailData.newsType == 2) {
this.PageName = TrackConstants.PageName.Live_Detail // 直播
} else if(this.contentDetailData.newsType == 5) {
this.PageName = TrackConstants.PageName.Summary_Detail // 专题详情页
} else if(this.contentDetailData.newsType == 8) {
this.PageName = TrackConstants.PageName.Article_Detail // 图文详情页
} else if(this.contentDetailData.newsType == 9) {
this.PageName = TrackConstants.PageName.Atlas_Detail // 图集详情页
} else if(this.contentDetailData.newsType == 14 || this.contentDetailData.newsType == 15) {
this.PageName = TrackConstants.PageName.DynamicDetail // 动态图文/动态视频
}
}
async onDetailUpdated() {
... ... @@ -376,7 +364,7 @@ export struct OperRowListView {
TapGesture()
.onAction((event: GestureEvent) => {
this.AudioSuspension.setPlayerUrl(this.audioUrl, this.audioTitle)
TrackingButton.click('suspendedWindow',this.PageName,this.PageName)
TrackingButton.click('suspendedWindow',this.pageId,this.pageName)
}))
}
.height(36)
... ... @@ -473,9 +461,9 @@ export struct OperRowListView {
this.newsStatusOfUser.collectStatus = this.newsStatusOfUser?.collectStatus === 1 ? 0 : 1
if (this.newsStatusOfUser.collectStatus === 1) {
promptAction.showToast({ message: '收藏成功' })
TrackingContent.collect(true,this.PageName,this.PageName,this.pageParam)
TrackingContent.collect(true,this.pageId,this.pageName,this.pageParam)
} else {
TrackingContent.collect(false,this.PageName,this.PageName,this.pageParam)
TrackingContent.collect(false,this.pageId,this.pageName,this.pageParam)
}
this.queryContentInteractCount()
}
... ...
... ... @@ -41,7 +41,8 @@ export struct PlayerRightView {
@State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
@State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以
pageParam: ParamType = {}
PageName: string = ''
@Consume pageName: string
@Consume pageId: string
followUserId: string = ''
followUserName: string = ''
... ... @@ -59,19 +60,6 @@ export struct PlayerRightView {
'contentId': `${this.contentDetailData.newsId}`,
'contentName': `${this.contentDetailData.newsTitle || ''}`,
}
if(this.contentDetailData.newsType == 1) {
this.PageName = TrackConstants.PageName.VideoDetail // 点播
} else if(this.contentDetailData.newsType == 2) {
this.PageName = TrackConstants.PageName.Live_Detail // 直播
} else if(this.contentDetailData.newsType == 5) {
this.PageName = TrackConstants.PageName.Summary_Detail // 专题详情页
} else if(this.contentDetailData.newsType == 8) {
this.PageName = TrackConstants.PageName.Article_Detail // 图文详情页
} else if(this.contentDetailData.newsType == 9) {
this.PageName = TrackConstants.PageName.Atlas_Detail // 图集详情页
} else if(this.contentDetailData.newsType == 14 || this.contentDetailData.newsType == 15) {
this.PageName = TrackConstants.PageName.DynamicDetail // 动态图文/动态视频
}
this.followUserId = this.contentDetailData?.rmhInfo?.rmhId || ''
this.followUserName = this.contentDetailData?.rmhInfo?.rmhName || ''
}
... ... @@ -104,11 +92,11 @@ export struct PlayerRightView {
this.newsStatusOfUser.likeStatus = this.newsStatusOfUser?.likeStatus == '1' ? '0' : '1'
if (this.newsStatusOfUser.likeStatus == '1') {
this.interactData.likeNum = Number(this.interactData.likeNum || 0) + 1
TrackingContent.like(true,this.PageName,this.PageName,this.pageParam)
TrackingContent.like(true,this.pageId,this.pageName,this.pageParam)
console.log(TAG, '点赞')
} else {
this.interactData.likeNum = Math.max(0, Number(this.interactData.likeNum || 0) - 1)
TrackingContent.like(false,this.PageName,this.PageName,this.pageParam)
TrackingContent.like(false,this.pageId,this.pageName,this.pageParam)
console.log(TAG, '取消点赞')
}
console.log(TAG, '点赞、取消点赞==', this.newsStatusOfUser?.likeStatus, this.interactData?.likeNum)
... ... @@ -144,11 +132,11 @@ export struct PlayerRightView {
// this.queryContentInteractCount()
if (this.newsStatusOfUser.collectStatus === 1) {
this.interactData.collectNum = Number(this.interactData.collectNum || 0) + 1
TrackingContent.collect(true,this.PageName,this.PageName,this.pageParam)
TrackingContent.collect(true,this.pageId,this.pageName,this.pageParam)
console.log(TAG, '收藏')
} else {
this.interactData.collectNum = Math.max(0, Number(this.interactData.collectNum || 0) - 1)
TrackingContent.collect(false,this.PageName,this.PageName,this.pageParam)
TrackingContent.collect(false,this.pageId,this.pageName,this.pageParam)
console.log(TAG, '取消收藏')
}
console.log(TAG, '收藏、取消收藏==', this.newsStatusOfUser?.collectStatus, this.interactData?.collectNum)
... ... @@ -212,7 +200,7 @@ export struct PlayerRightView {
}
})
console.log(TAG, '关注号主')
TrackingContent.follow(true,this.followUserId,this.followUserName,TrackConstants.PageName.Atlas_Detail,TrackConstants.PageName.Atlas_Detail,this.pageParam)
TrackingContent.follow(true,this.followUserId,this.followUserName,this.pageId,this.pageName,this.pageParam)
}
})
}
... ...
... ... @@ -179,7 +179,9 @@ export struct VideoChannelPage {
pageId: item.pageId + '',
channelId: item.channelId + '',
autoRefresh: this.autoRefresh
}).margin({ top: 40 })
})
.margin({ top: 40 })
.backgroundColor(Color.White)
}
}, (item: TopNavDTO) => item.channelId + '')
}
... ...