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:直播详情页面,预约和取消预约埋点
Showing
9 changed files
with
63 additions
and
23 deletions
| @@ -37,7 +37,7 @@ export struct ENewspaperItemComponent { | @@ -37,7 +37,7 @@ export struct ENewspaperItemComponent { | ||
| 37 | .onComplete(() => { | 37 | .onComplete(() => { |
| 38 | this.isShowSkeleton = false | 38 | this.isShowSkeleton = false |
| 39 | }) | 39 | }) |
| 40 | - .objectFit(ImageFit.Contain) | 40 | + .objectFit(ImageFit.Fill) |
| 41 | .visibility(this.isShowSkeleton ? Visibility.None : Visibility.Visible) | 41 | .visibility(this.isShowSkeleton ? Visibility.None : Visibility.Visible) |
| 42 | 42 | ||
| 43 | Canvas(this.context) | 43 | Canvas(this.context) |
| @@ -91,7 +91,7 @@ export struct ZhSingleRow02 { | @@ -91,7 +91,7 @@ export struct ZhSingleRow02 { | ||
| 91 | .margin({ right: 8 }) | 91 | .margin({ right: 8 }) |
| 92 | }) | 92 | }) |
| 93 | } | 93 | } |
| 94 | - if (this.compDTO.operDataList.length > 2) { | 94 | + if (this.compDTO.operDataList.length >= 2) { |
| 95 | Column() { | 95 | Column() { |
| 96 | if (this.moreWidth > this.initMoreWidth + 2) { | 96 | if (this.moreWidth > this.initMoreWidth + 2) { |
| 97 | Text(this.moreTips) | 97 | Text(this.moreTips) |
| @@ -112,7 +112,7 @@ export struct ZhSingleRow02 { | @@ -112,7 +112,7 @@ export struct ZhSingleRow02 { | ||
| 112 | .width(CommonConstants.FULL_WIDTH) | 112 | .width(CommonConstants.FULL_WIDTH) |
| 113 | .height(208) | 113 | .height(208) |
| 114 | .align(Alignment.Start) | 114 | .align(Alignment.Start) |
| 115 | - .scrollable(this.compDTO.operDataList.length > 2 ? ScrollDirection.Horizontal : ScrollDirection.None) | 115 | + .scrollable(this.compDTO.operDataList.length >= 2 ? ScrollDirection.Horizontal : ScrollDirection.None) |
| 116 | .scrollBar(BarState.Off) | 116 | .scrollBar(BarState.Off) |
| 117 | .edgeEffect(EdgeEffect.None) | 117 | .edgeEffect(EdgeEffect.None) |
| 118 | .onReachEnd(() => { | 118 | .onReachEnd(() => { |
| @@ -155,7 +155,7 @@ export struct ZhSingleRow03 { | @@ -155,7 +155,7 @@ export struct ZhSingleRow03 { | ||
| 155 | this.ItemCard(item) | 155 | this.ItemCard(item) |
| 156 | }) | 156 | }) |
| 157 | } | 157 | } |
| 158 | - if (this.compDTO.operDataList.length > 2) { | 158 | + if (this.compDTO.operDataList.length >= 2) { |
| 159 | Column() { | 159 | Column() { |
| 160 | if (this.moreWidth > this.initMoreWidth + 2) { | 160 | if (this.moreWidth > this.initMoreWidth + 2) { |
| 161 | Text(this.moreTips) | 161 | Text(this.moreTips) |
| @@ -174,7 +174,7 @@ export struct ZhSingleRow03 { | @@ -174,7 +174,7 @@ export struct ZhSingleRow03 { | ||
| 174 | } | 174 | } |
| 175 | } | 175 | } |
| 176 | .align(Alignment.Start) | 176 | .align(Alignment.Start) |
| 177 | - .scrollable(this.compDTO.operDataList.length > 2 ? ScrollDirection.Horizontal : ScrollDirection.None) | 177 | + .scrollable(this.compDTO.operDataList.length >= 2 ? ScrollDirection.Horizontal : ScrollDirection.None) |
| 178 | .scrollBar(BarState.Off) | 178 | .scrollBar(BarState.Off) |
| 179 | .edgeEffect(EdgeEffect.None) | 179 | .edgeEffect(EdgeEffect.None) |
| 180 | .onReachEnd(() => { | 180 | .onReachEnd(() => { |
| @@ -104,7 +104,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { | @@ -104,7 +104,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { | ||
| 104 | }) | 104 | }) |
| 105 | 105 | ||
| 106 | }.justifyContent(FlexAlign.SpaceBetween) | 106 | }.justifyContent(FlexAlign.SpaceBetween) |
| 107 | - .padding({ left: 16, right: 16 }) | 107 | + // .padding({ left: 16, right: 16 }) |
| 108 | .margin({ top: 8, bottom: 8 }) | 108 | .margin({ top: 8, bottom: 8 }) |
| 109 | .width('100%') | 109 | .width('100%') |
| 110 | 110 | ||
| @@ -131,7 +131,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { | @@ -131,7 +131,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { | ||
| 131 | .width(150) | 131 | .width(150) |
| 132 | .lineHeight(19) | 132 | .lineHeight(19) |
| 133 | } | 133 | } |
| 134 | - .padding({ left: (index == 0) ? 16 : 0, right: 16 }) | 134 | + .padding({ right: 16 }) |
| 135 | // .offset({x:16}) | 135 | // .offset({x:16}) |
| 136 | .onClick(() => { | 136 | .onClick(() => { |
| 137 | InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName) | 137 | InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName) |
| @@ -187,12 +187,12 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { | @@ -187,12 +187,12 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { | ||
| 187 | // .margin({left:16,right:16}) | 187 | // .margin({left:16,right:16}) |
| 188 | 188 | ||
| 189 | } | 189 | } |
| 190 | - .width("100%") | 190 | + // .width("100%") |
| 191 | .padding({ | 191 | .padding({ |
| 192 | - top: 14, | ||
| 193 | - left: 0, | ||
| 194 | - right: 0, | ||
| 195 | - bottom: 14 | 192 | + left: $r('app.float.card_comp_pagePadding_lf'), |
| 193 | + right: $r('app.float.card_comp_pagePadding_lf'), | ||
| 194 | + top: $r('app.float.card_comp_pagePadding_tb'), | ||
| 195 | + bottom: $r('app.float.card_comp_pagePadding_tb') | ||
| 196 | }) | 196 | }) |
| 197 | .backgroundColor($r("app.color.white")) | 197 | .backgroundColor($r("app.color.white")) |
| 198 | // .backgroundColor($r("app.color.color_FE4B05")) | 198 | // .backgroundColor($r("app.color.color_FE4B05")) |
| @@ -119,7 +119,7 @@ export struct LiveHorizontalCardComponent { | @@ -119,7 +119,7 @@ export struct LiveHorizontalCardComponent { | ||
| 119 | }) | 119 | }) |
| 120 | } | 120 | } |
| 121 | }.justifyContent(FlexAlign.SpaceBetween) | 121 | }.justifyContent(FlexAlign.SpaceBetween) |
| 122 | - .padding({ left: 16, right: 16 }) | 122 | + // .padding({ left: 16, right: 16 }) |
| 123 | .margin({ top: 8, bottom: 8 }) | 123 | .margin({ top: 8, bottom: 8 }) |
| 124 | .width(CommonConstants.FULL_WIDTH) | 124 | .width(CommonConstants.FULL_WIDTH) |
| 125 | 125 | ||
| @@ -153,7 +153,7 @@ export struct LiveHorizontalCardComponent { | @@ -153,7 +153,7 @@ export struct LiveHorizontalCardComponent { | ||
| 153 | .margin({ top: 8 }) | 153 | .margin({ top: 8 }) |
| 154 | .width(this.compDTO.operDataList.length == 2 ? 210 : 150) | 154 | .width(this.compDTO.operDataList.length == 2 ? 210 : 150) |
| 155 | } | 155 | } |
| 156 | - .padding({ left: (index == 0) ? 16 : 0, right: 16 }) | 156 | + .padding({ right: 16 }) |
| 157 | .onClick(() => { | 157 | .onClick(() => { |
| 158 | InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName) | 158 | InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName) |
| 159 | if (item.objectType != '0') { | 159 | if (item.objectType != '0') { |
| @@ -163,7 +163,7 @@ export struct LiveHorizontalCardComponent { | @@ -163,7 +163,7 @@ export struct LiveHorizontalCardComponent { | ||
| 163 | }) | 163 | }) |
| 164 | }) | 164 | }) |
| 165 | } | 165 | } |
| 166 | - if (this.compDTO.operDataList.length > 2) { | 166 | + if (this.compDTO.operDataList.length >= 2) { |
| 167 | Column() { | 167 | Column() { |
| 168 | if (this.moreWidth > this.initMoreWidth + 2) { | 168 | if (this.moreWidth > this.initMoreWidth + 2) { |
| 169 | Text(this.moreTips) | 169 | Text(this.moreTips) |
| @@ -182,7 +182,7 @@ export struct LiveHorizontalCardComponent { | @@ -182,7 +182,7 @@ export struct LiveHorizontalCardComponent { | ||
| 182 | } | 182 | } |
| 183 | } | 183 | } |
| 184 | .align(Alignment.Start) | 184 | .align(Alignment.Start) |
| 185 | - .scrollable(this.compDTO.operDataList.length > 2 ? ScrollDirection.Horizontal : ScrollDirection.None) | 185 | + .scrollable(this.compDTO.operDataList.length >= 2 ? ScrollDirection.Horizontal : ScrollDirection.None) |
| 186 | .scrollBar(BarState.Off) | 186 | .scrollBar(BarState.Off) |
| 187 | .edgeEffect(EdgeEffect.None) | 187 | .edgeEffect(EdgeEffect.None) |
| 188 | .onReachEnd(() => { | 188 | .onReachEnd(() => { |
| @@ -211,9 +211,12 @@ export struct LiveHorizontalCardComponent { | @@ -211,9 +211,12 @@ export struct LiveHorizontalCardComponent { | ||
| 211 | LiveHorizontalCardForOneComponent({ contentDTO: this.compDTO.operDataList[0] }) | 211 | LiveHorizontalCardForOneComponent({ contentDTO: this.compDTO.operDataList[0] }) |
| 212 | } | 212 | } |
| 213 | } | 213 | } |
| 214 | - .width(CommonConstants.FULL_WIDTH) | 214 | + // .width(CommonConstants.FULL_WIDTH) |
| 215 | .padding({ | 215 | .padding({ |
| 216 | - top: 14, | 216 | + left: $r('app.float.card_comp_pagePadding_lf'), |
| 217 | + right: $r('app.float.card_comp_pagePadding_lf'), | ||
| 218 | + top: $r('app.float.card_comp_pagePadding_tb'), | ||
| 219 | + bottom: $r('app.float.card_comp_pagePadding_tb') | ||
| 217 | }) | 220 | }) |
| 218 | .backgroundColor($r("app.color.white")) | 221 | .backgroundColor($r("app.color.white")) |
| 219 | } | 222 | } |
| @@ -4,6 +4,7 @@ import { DateTimeUtils, StringUtils, ToastUtils } from 'wdKit/Index' | @@ -4,6 +4,7 @@ import { DateTimeUtils, StringUtils, ToastUtils } from 'wdKit/Index' | ||
| 4 | import { LiveViewModel } from '../../viewModel/LiveViewModel' | 4 | import { LiveViewModel } from '../../viewModel/LiveViewModel' |
| 5 | import { HttpUtils } from 'wdNetwork/Index' | 5 | import { HttpUtils } from 'wdNetwork/Index' |
| 6 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index' | 6 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index' |
| 7 | +import { ParamType, TrackConstants, TrackingContent } from 'wdTracking/Index' | ||
| 7 | 8 | ||
| 8 | @Component | 9 | @Component |
| 9 | export struct LiveCountdownComponent { | 10 | export struct LiveCountdownComponent { |
| @@ -19,6 +20,7 @@ export struct LiveCountdownComponent { | @@ -19,6 +20,7 @@ export struct LiveCountdownComponent { | ||
| 19 | //是否预约过直播 | 20 | //是否预约过直播 |
| 20 | @State isAppointmentLive: boolean = false | 21 | @State isAppointmentLive: boolean = false |
| 21 | liveViewModel: LiveViewModel = new LiveViewModel() | 22 | liveViewModel: LiveViewModel = new LiveViewModel() |
| 23 | + pageParam: ParamType = {} | ||
| 22 | 24 | ||
| 23 | aboutToAppear(): void { | 25 | aboutToAppear(): void { |
| 24 | //注册字体 | 26 | //注册字体 |
| @@ -30,6 +32,15 @@ export struct LiveCountdownComponent { | @@ -30,6 +32,15 @@ export struct LiveCountdownComponent { | ||
| 30 | this.textTimerController.start() | 32 | this.textTimerController.start() |
| 31 | }, 0) | 33 | }, 0) |
| 32 | this.updateData() | 34 | this.updateData() |
| 35 | + this.contentTrackingDict() | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + contentTrackingDict() { | ||
| 39 | + this.pageParam = { | ||
| 40 | + 'contentType': `${this.liveDetailsBean.newsType}`, | ||
| 41 | + 'contentId': `${this.liveDetailsBean.newsId}`, | ||
| 42 | + 'contentName': `${this.liveDetailsBean.newsTitle || ''}`, | ||
| 43 | + } | ||
| 33 | } | 44 | } |
| 34 | 45 | ||
| 35 | build() { | 46 | build() { |
| @@ -141,7 +152,7 @@ export struct LiveCountdownComponent { | @@ -141,7 +152,7 @@ export struct LiveCountdownComponent { | ||
| 141 | } | 152 | } |
| 142 | //2024-04-01 19:44:00-trim->2024-04-0119:44:00 | 153 | //2024-04-01 19:44:00-trim->2024-04-0119:44:00 |
| 143 | if (StringUtils.isNotEmpty(this.liveDetailsBean.liveInfo?.planStartTime)) { | 154 | if (StringUtils.isNotEmpty(this.liveDetailsBean.liveInfo?.planStartTime)) { |
| 144 | - let playStartTimeTmp = this.liveDetailsBean.liveInfo?.planStartTime+'' | 155 | + let playStartTimeTmp = this.liveDetailsBean.liveInfo?.planStartTime + '' |
| 145 | this.month = Number(playStartTimeTmp.substring(5, 7)).toString() | 156 | this.month = Number(playStartTimeTmp.substring(5, 7)).toString() |
| 146 | this.day = playStartTimeTmp.substring(8, 10) | 157 | this.day = playStartTimeTmp.substring(8, 10) |
| 147 | this.hour = playStartTimeTmp.substring(11, 13) | 158 | this.hour = playStartTimeTmp.substring(11, 13) |
| @@ -152,7 +163,7 @@ export struct LiveCountdownComponent { | @@ -152,7 +163,7 @@ export struct LiveCountdownComponent { | ||
| 152 | getLiveAppointmentStatus() { | 163 | getLiveAppointmentStatus() { |
| 153 | this.liveViewModel.getLiveAppointmentStatus( | 164 | this.liveViewModel.getLiveAppointmentStatus( |
| 154 | this.liveDetailsBean.reLInfo ? this.liveDetailsBean.reLInfo.relId : '', | 165 | this.liveDetailsBean.reLInfo ? this.liveDetailsBean.reLInfo.relId : '', |
| 155 | - this.liveDetailsBean.newsId+'' | 166 | + this.liveDetailsBean.newsId + '' |
| 156 | ).then( | 167 | ).then( |
| 157 | (data) => { | 168 | (data) => { |
| 158 | this.isAppointmentLive = data | 169 | this.isAppointmentLive = data |
| @@ -165,15 +176,19 @@ export struct LiveCountdownComponent { | @@ -165,15 +176,19 @@ export struct LiveCountdownComponent { | ||
| 165 | liveAppointment() { | 176 | liveAppointment() { |
| 166 | this.liveViewModel.liveAppointment( | 177 | this.liveViewModel.liveAppointment( |
| 167 | this.liveDetailsBean.reLInfo ? this.liveDetailsBean.reLInfo.relId : '', | 178 | this.liveDetailsBean.reLInfo ? this.liveDetailsBean.reLInfo.relId : '', |
| 168 | - this.liveDetailsBean.newsId+'', | 179 | + this.liveDetailsBean.newsId + '', |
| 169 | !this.isAppointmentLive).then( | 180 | !this.isAppointmentLive).then( |
| 170 | (data) => { | 181 | (data) => { |
| 171 | if (data.success) { | 182 | if (data.success) { |
| 172 | this.isAppointmentLive = !this.isAppointmentLive | 183 | this.isAppointmentLive = !this.isAppointmentLive |
| 173 | if (this.isAppointmentLive) { | 184 | if (this.isAppointmentLive) { |
| 174 | ToastUtils.showToast('预约成功', 1000) | 185 | ToastUtils.showToast('预约成功', 1000) |
| 186 | + TrackingContent.subscribeClick(true, TrackConstants.PageName.Live_Detail, | ||
| 187 | + TrackConstants.PageName.Live_Detail, this.pageParam) | ||
| 175 | } else { | 188 | } else { |
| 176 | ToastUtils.showToast('取消预约成功', 1000) | 189 | ToastUtils.showToast('取消预约成功', 1000) |
| 190 | + TrackingContent.subscribeClick(false, TrackConstants.PageName.Live_Detail, | ||
| 191 | + TrackConstants.PageName.Live_Detail, this.pageParam) | ||
| 177 | } | 192 | } |
| 178 | } | 193 | } |
| 179 | }, | 194 | }, |
| @@ -36,11 +36,11 @@ export struct TopPlayComponent { | @@ -36,11 +36,11 @@ export struct TopPlayComponent { | ||
| 36 | 36 | ||
| 37 | aboutToAppear(): void { | 37 | aboutToAppear(): void { |
| 38 | if (this.playerController) { | 38 | if (this.playerController) { |
| 39 | + | ||
| 39 | this.playerController.onCanplay = () => { | 40 | this.playerController.onCanplay = () => { |
| 40 | this.isCanPlay = true | 41 | this.isCanPlay = true |
| 41 | this.isLoading = true | 42 | this.isLoading = true |
| 42 | this.playerController?.play() | 43 | this.playerController?.play() |
| 43 | - | ||
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | this.playerController.onStatusChange = (status: number) => { | 46 | this.playerController.onStatusChange = (status: number) => { |
| @@ -113,6 +113,29 @@ export class TrackingContent { | @@ -113,6 +113,29 @@ export class TrackingContent { | ||
| 113 | 113 | ||
| 114 | } | 114 | } |
| 115 | 115 | ||
| 116 | + | ||
| 117 | + /** | ||
| 118 | + * 直播预约埋点 | ||
| 119 | + * @param isSubscribeFlag | ||
| 120 | + * @param pageId | ||
| 121 | + * @param pageName | ||
| 122 | + * @param extParams | ||
| 123 | + */ | ||
| 124 | + static subscribeClick(isSubscribeFlag:boolean ,pageId: string, pageName: string,extParams?: ParamType){ | ||
| 125 | + let params = TrackingUtils.generateParams(extParams) | ||
| 126 | + if (pageId.length) { | ||
| 127 | + params["pageId"] = pageId | ||
| 128 | + } | ||
| 129 | + if (pageName.length) { | ||
| 130 | + params["pageName"] = pageName | ||
| 131 | + } | ||
| 132 | + | ||
| 133 | + let event = isSubscribeFlag?'live_subscribe_click':'cancel_live_subscribe_click' | ||
| 134 | + TrackingUtils.fillPositionWith(params) | ||
| 135 | + Tracking.event(event, params) | ||
| 136 | + } | ||
| 137 | + | ||
| 138 | + | ||
| 116 | // 内容下载点击事件 1.图片 2.音频 3.视频 | 139 | // 内容下载点击事件 1.图片 2.音频 3.视频 |
| 117 | static download(donwloadContentType: number, pageId: string, pageName: string, extParams?: ParamType) { | 140 | static download(donwloadContentType: number, pageId: string, pageName: string, extParams?: ParamType) { |
| 118 | let params = TrackingUtils.generateParams(extParams) | 141 | let params = TrackingUtils.generateParams(extParams) |
-
Please register or login to post a comment