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: 20730 直播频道页面展示的多个更多按钮,没有对齐
  feat: 19239 跳转直播
... ... @@ -50,20 +50,20 @@ export struct CompParser {
// 轮播图屏蔽音频类型稿件
if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) {
this.audioItems = this.compDTO.operDataList.filter(item => {
return item.objectType === '13' || item.linkUrl.includes('audiotopic')
return item.objectType === '13' || item.linkUrl?.includes('audiotopic')
})
this.noneAudioItems = this.compDTO.operDataList.filter(item => {
return item.objectType !== '13' && !item.linkUrl.includes('audiotopic')
return item.objectType !== '13' && !item.linkUrl?.includes('audiotopic')
})
this.compDTO.operDataList = this.noneAudioItems;
}
// 金刚卡屏蔽音频类型稿件
if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_03) {
this.audioItems = this.compDTO.operDataList.filter(item => {
return item.objectType === '13' || item.linkUrl.includes('audiotopic')
return item.objectType === '13' || item.linkUrl?.includes('audiotopic')
})
this.noneAudioItems = this.compDTO.operDataList.filter(item => {
return item.objectType !== '13' && !item.linkUrl.includes('audiotopic')
return item.objectType !== '13' && !item.linkUrl?.includes('audiotopic')
})
this.compDTO.operDataList = this.noneAudioItems;
}
... ...
... ... @@ -87,7 +87,7 @@ export struct ZhCarouselLayout01 {
filterAtv() {
return this.compDTO.operDataList.filter(((item: ContentDTO) => {
return !item.linkUrl.includes('/h/atv')
return !item.linkUrl?.includes('/h/atv')
}))
}
... ...
... ... @@ -87,6 +87,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
.height(14)
}
.visibility(this.showMore() ? Visibility.Visible : Visibility.None)
.margin({right: 16})
.onClick(() => {
ProcessUtils.compJumpPage(this.compDTO)
})
... ...
... ... @@ -136,6 +136,7 @@ export struct LiveHorizontalCardComponent {
.width(14)
.height(14)
}
.margin({right: 16})
.onClick(() => {
this.liveToMore();
})
... ...
... ... @@ -8,13 +8,14 @@ import { WDRouterPage, WDRouterRule } from 'wdRouter';
import { DisplayDirection } from 'wdConstant/Index';
import { CompUtils, GrayManageModel, PageComponent } from 'wdComponent/Index';
import { TrackingButton, TrackConstants } from 'wdTracking/Index';
import { Logger, WindowModel } from 'wdKit';
import { ParamType, Tracking } from 'wdTracking/Index';
import { ColorUtils } from 'wdComponent/src/main/ets/utils/ColorUtils';
import { ImageKnifeComponent } from '@ohos/imageknife';
import { CommonUtils } from 'wdComponent/src/main/ets/utils/CommonUtils';
import { AudioSuspensionModel } from 'wdComponent'
import { BusinessError } from '@kit.BasicServicesKit';
import { EmitterEventId, EmitterUtils } from 'wdKit';
import { AssignChannelParam } from 'wdRouter/Index';
const TAG = 'VideoChannelPage'
... ... @@ -58,6 +59,18 @@ export struct VideoChannelPage {
if (this.currentTopNavSelectedIndex === 0) {
this.handleAudio(this.topNavList[0])
}
EmitterUtils.receiveEvent(EmitterEventId.JUMP_HOME_CHANNEL, (str?: string) => {
// Logger.debug(TAG, 'receiveEvent JUMP_HOME_CHANNEL: ' + str)
if (str) {
// 跳转指定频道场景,传参底导id、频道id
let assignChannel = JSON.parse(str) as AssignChannelParam
let index = this.topNavList.findIndex((item: TopNavDTO, index) => {
return Number(assignChannel.channelId) == item.channelId && Number(assignChannel.pageId) == item.pageId
}) || 0
this.clickTopNav(index)
}
})
}
/**
... ... @@ -149,6 +162,25 @@ export struct VideoChannelPage {
.height('100%')
}
clickTopNav(index: number) {
// 视频tab埋点
const tab = this.topNavList[index]
this.handleAudio(tab)
// Logger.info(TAG, `视频tab埋点: ${JSON.stringify(tab)}`);
const params: ParamType = {
"pageName": tab.name,
"tabName": tab.name,
"pageId": tab.pageId,
}
Tracking.event("video_page_tab_click", params)
if (this.currentTopNavSelectedIndex === index) {
this.autoRefresh++
}
this.currentTopNavSelectedIndex = index
this.swiperController.changeIndex(index, true)
}
@Builder
topNavView() {
Stack({ alignContent: Alignment.End }) {
... ... @@ -202,23 +234,7 @@ export struct VideoChannelPage {
right: item.iconUrl && item.iconCUrl ? 0 : $r('app.float.top_tab_item_padding_horizontal'),
})
.onClick(() => {
// 视频tab埋点
const tab = this.topNavList[index]
this.handleAudio(tab)
// Logger.info(TAG, `视频tab埋点: ${JSON.stringify(tab)}`);
const params: ParamType = {
"pageName": tab.name,
"tabName": tab.name,
"pageId": tab.pageId,
}
Tracking.event("video_page_tab_click", params)
if (this.currentTopNavSelectedIndex === index) {
this.autoRefresh++
}
this.currentTopNavSelectedIndex = index
this.swiperController.changeIndex(index, true)
this.clickTopNav(index)
})
.grayscale(this.GrayManage.get().isVideoMourning(`${item.channelId}`) ? 1 : 0)
}, (item: TopNavDTO) => item.channelId + '')
... ...