wangliang_wd

Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool into main

* 'main' of http://192.168.1.42/developOne/harmonyPool:
  feat: 17046 UI还原问题--【生产环境】正在直播,横滑动卡,右边编剧问题,看图
  电子报直板、折叠屏、pad适配
  feat:直播详情页面,预约和取消预约埋点
... ... @@ -37,7 +37,7 @@ export struct ENewspaperItemComponent {
.onComplete(() => {
this.isShowSkeleton = false
})
.objectFit(ImageFit.Contain)
.objectFit(ImageFit.Fill)
.visibility(this.isShowSkeleton ? Visibility.None : Visibility.Visible)
Canvas(this.context)
... ...
... ... @@ -91,7 +91,7 @@ export struct ZhSingleRow02 {
.margin({ right: 8 })
})
}
if (this.compDTO.operDataList.length > 2) {
if (this.compDTO.operDataList.length >= 2) {
Column() {
if (this.moreWidth > this.initMoreWidth + 2) {
Text(this.moreTips)
... ... @@ -112,7 +112,7 @@ export struct ZhSingleRow02 {
.width(CommonConstants.FULL_WIDTH)
.height(208)
.align(Alignment.Start)
.scrollable(this.compDTO.operDataList.length > 2 ? ScrollDirection.Horizontal : ScrollDirection.None)
.scrollable(this.compDTO.operDataList.length >= 2 ? ScrollDirection.Horizontal : ScrollDirection.None)
.scrollBar(BarState.Off)
.edgeEffect(EdgeEffect.None)
.onReachEnd(() => {
... ...
... ... @@ -155,7 +155,7 @@ export struct ZhSingleRow03 {
this.ItemCard(item)
})
}
if (this.compDTO.operDataList.length > 2) {
if (this.compDTO.operDataList.length >= 2) {
Column() {
if (this.moreWidth > this.initMoreWidth + 2) {
Text(this.moreTips)
... ... @@ -174,7 +174,7 @@ export struct ZhSingleRow03 {
}
}
.align(Alignment.Start)
.scrollable(this.compDTO.operDataList.length > 2 ? ScrollDirection.Horizontal : ScrollDirection.None)
.scrollable(this.compDTO.operDataList.length >= 2 ? ScrollDirection.Horizontal : ScrollDirection.None)
.scrollBar(BarState.Off)
.edgeEffect(EdgeEffect.None)
.onReachEnd(() => {
... ...
... ... @@ -104,7 +104,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
})
}.justifyContent(FlexAlign.SpaceBetween)
.padding({ left: 16, right: 16 })
// .padding({ left: 16, right: 16 })
.margin({ top: 8, bottom: 8 })
.width('100%')
... ... @@ -131,7 +131,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
.width(150)
.lineHeight(19)
}
.padding({ left: (index == 0) ? 16 : 0, right: 16 })
.padding({ right: 16 })
// .offset({x:16})
.onClick(() => {
InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName)
... ... @@ -187,12 +187,12 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
// .margin({left:16,right:16})
}
.width("100%")
// .width("100%")
.padding({
top: 14,
left: 0,
right: 0,
bottom: 14
left: $r('app.float.card_comp_pagePadding_lf'),
right: $r('app.float.card_comp_pagePadding_lf'),
top: $r('app.float.card_comp_pagePadding_tb'),
bottom: $r('app.float.card_comp_pagePadding_tb')
})
.backgroundColor($r("app.color.white"))
// .backgroundColor($r("app.color.color_FE4B05"))
... ...
... ... @@ -119,7 +119,7 @@ export struct LiveHorizontalCardComponent {
})
}
}.justifyContent(FlexAlign.SpaceBetween)
.padding({ left: 16, right: 16 })
// .padding({ left: 16, right: 16 })
.margin({ top: 8, bottom: 8 })
.width(CommonConstants.FULL_WIDTH)
... ... @@ -153,7 +153,7 @@ export struct LiveHorizontalCardComponent {
.margin({ top: 8 })
.width(this.compDTO.operDataList.length == 2 ? 210 : 150)
}
.padding({ left: (index == 0) ? 16 : 0, right: 16 })
.padding({ right: 16 })
.onClick(() => {
InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName)
if (item.objectType != '0') {
... ... @@ -163,7 +163,7 @@ export struct LiveHorizontalCardComponent {
})
})
}
if (this.compDTO.operDataList.length > 2) {
if (this.compDTO.operDataList.length >= 2) {
Column() {
if (this.moreWidth > this.initMoreWidth + 2) {
Text(this.moreTips)
... ... @@ -182,7 +182,7 @@ export struct LiveHorizontalCardComponent {
}
}
.align(Alignment.Start)
.scrollable(this.compDTO.operDataList.length > 2 ? ScrollDirection.Horizontal : ScrollDirection.None)
.scrollable(this.compDTO.operDataList.length >= 2 ? ScrollDirection.Horizontal : ScrollDirection.None)
.scrollBar(BarState.Off)
.edgeEffect(EdgeEffect.None)
.onReachEnd(() => {
... ... @@ -211,9 +211,12 @@ export struct LiveHorizontalCardComponent {
LiveHorizontalCardForOneComponent({ contentDTO: this.compDTO.operDataList[0] })
}
}
.width(CommonConstants.FULL_WIDTH)
// .width(CommonConstants.FULL_WIDTH)
.padding({
top: 14,
left: $r('app.float.card_comp_pagePadding_lf'),
right: $r('app.float.card_comp_pagePadding_lf'),
top: $r('app.float.card_comp_pagePadding_tb'),
bottom: $r('app.float.card_comp_pagePadding_tb')
})
.backgroundColor($r("app.color.white"))
}
... ...
... ... @@ -4,6 +4,7 @@ import { DateTimeUtils, StringUtils, ToastUtils } from 'wdKit/Index'
import { LiveViewModel } from '../../viewModel/LiveViewModel'
import { HttpUtils } from 'wdNetwork/Index'
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'
import { ParamType, TrackConstants, TrackingContent } from 'wdTracking/Index'
@Component
export struct LiveCountdownComponent {
... ... @@ -19,6 +20,7 @@ export struct LiveCountdownComponent {
//是否预约过直播
@State isAppointmentLive: boolean = false
liveViewModel: LiveViewModel = new LiveViewModel()
pageParam: ParamType = {}
aboutToAppear(): void {
//注册字体
... ... @@ -30,6 +32,15 @@ export struct LiveCountdownComponent {
this.textTimerController.start()
}, 0)
this.updateData()
this.contentTrackingDict()
}
contentTrackingDict() {
this.pageParam = {
'contentType': `${this.liveDetailsBean.newsType}`,
'contentId': `${this.liveDetailsBean.newsId}`,
'contentName': `${this.liveDetailsBean.newsTitle || ''}`,
}
}
build() {
... ... @@ -141,7 +152,7 @@ export struct LiveCountdownComponent {
}
//2024-04-01 19:44:00-trim->2024-04-0119:44:00
if (StringUtils.isNotEmpty(this.liveDetailsBean.liveInfo?.planStartTime)) {
let playStartTimeTmp = this.liveDetailsBean.liveInfo?.planStartTime+''
let playStartTimeTmp = this.liveDetailsBean.liveInfo?.planStartTime + ''
this.month = Number(playStartTimeTmp.substring(5, 7)).toString()
this.day = playStartTimeTmp.substring(8, 10)
this.hour = playStartTimeTmp.substring(11, 13)
... ... @@ -152,7 +163,7 @@ export struct LiveCountdownComponent {
getLiveAppointmentStatus() {
this.liveViewModel.getLiveAppointmentStatus(
this.liveDetailsBean.reLInfo ? this.liveDetailsBean.reLInfo.relId : '',
this.liveDetailsBean.newsId+''
this.liveDetailsBean.newsId + ''
).then(
(data) => {
this.isAppointmentLive = data
... ... @@ -165,15 +176,19 @@ export struct LiveCountdownComponent {
liveAppointment() {
this.liveViewModel.liveAppointment(
this.liveDetailsBean.reLInfo ? this.liveDetailsBean.reLInfo.relId : '',
this.liveDetailsBean.newsId+'',
this.liveDetailsBean.newsId + '',
!this.isAppointmentLive).then(
(data) => {
if (data.success) {
this.isAppointmentLive = !this.isAppointmentLive
if (this.isAppointmentLive) {
ToastUtils.showToast('预约成功', 1000)
TrackingContent.subscribeClick(true, TrackConstants.PageName.Live_Detail,
TrackConstants.PageName.Live_Detail, this.pageParam)
} else {
ToastUtils.showToast('取消预约成功', 1000)
TrackingContent.subscribeClick(false, TrackConstants.PageName.Live_Detail,
TrackConstants.PageName.Live_Detail, this.pageParam)
}
}
},
... ...
... ... @@ -34,7 +34,6 @@ export struct TabComponent {
build() {
Column() {
// 页签
Row() {
Scroll() {
... ...
... ... @@ -36,11 +36,11 @@ export struct TopPlayComponent {
aboutToAppear(): void {
if (this.playerController) {
this.playerController.onCanplay = () => {
this.isCanPlay = true
this.isLoading = true
this.playerController?.play()
}
this.playerController.onStatusChange = (status: number) => {
... ...
... ... @@ -113,6 +113,29 @@ export class TrackingContent {
}
/**
* 直播预约埋点
* @param isSubscribeFlag
* @param pageId
* @param pageName
* @param extParams
*/
static subscribeClick(isSubscribeFlag:boolean ,pageId: string, pageName: string,extParams?: ParamType){
let params = TrackingUtils.generateParams(extParams)
if (pageId.length) {
params["pageId"] = pageId
}
if (pageName.length) {
params["pageName"] = pageName
}
let event = isSubscribeFlag?'live_subscribe_click':'cancel_live_subscribe_click'
TrackingUtils.fillPositionWith(params)
Tracking.event(event, params)
}
// 内容下载点击事件 1.图片 2.音频 3.视频
static download(donwloadContentType: number, pageId: string, pageName: string, extParams?: ParamType) {
let params = TrackingUtils.generateParams(extParams)
... ...