wangliang_wd

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

* 'main' of http://192.168.1.42/developOne/harmonyPool:
  ref |> 处理一处误处理直播弹wifi提示
  ref |> 升级阿里播放器SDK版本至apsaravideo_player_sdk_harmonyosnext_20241008.har
  fix |> 20302 uat>导航换肤,新闻频道列表页,内容区背景未展示换肤图片。
... ... @@ -44,6 +44,8 @@ export struct PageComponent {
GrayManage: SubscribedAbstractProperty<GrayManageModel> = AppStorage.link<GrayManageModel>('GrayManage')
@State netStatus: number | undefined = undefined // 存储网络状态
bottomNavi:BottomNavi = BottomNavi.NEWS
@Prop scrollBgHeight:number = 0
onHideBgImage?: (isShow:boolean) => void;
build() {
Column() {
... ... @@ -156,6 +158,20 @@ export struct PageComponent {
this.pageModel.endIndex = end;
})
.id('page_list')
.onDidScroll(() => {
if(this.scrollBgHeight === 0){
return
}
let y = this.listScroller.currentOffset().yOffset
if (this.onHideBgImage !== undefined ) {
if( y - this.scrollBgHeight > 0){
this.onHideBgImage(true)
}else{
this.onHideBgImage(false)
}
}
})
// 挂角广告
this.pageHornAd()
... ...
import { BottomNavDTO, NavigationDetailDTO, TopNavDTO } from 'wdBean';
import { Logger, NetworkUtil, SPHelper, ToastUtils } from 'wdKit';
import { Logger, NetworkUtil, SPHelper, StringUtils, ToastUtils } from 'wdKit';
import { ProcessUtils, WDRouterPage, WDRouterRule } from 'wdRouter';
import { PageComponent } from './PageComponent';
import { ChannelSubscriptionLayout } from './ChannelSubscriptionLayout';
... ... @@ -75,9 +75,25 @@ export struct TopNavigationComponentNew {
@State backgroundImageH: number = 0
// 国殇灰度管理
GrayManage: SubscribedAbstractProperty<GrayManageModel> = AppStorage.link<GrayManageModel>('GrayManage')
@State backImageHeight:number = 0
@State isHideBackgroundImage:boolean = false
build() {
Column() {
Stack({ alignContent: Alignment.Top }) {
// 顶部背景图
if(StringUtils.isNotEmpty(this.navItem.backgroundUrl)){
Image(this.navItem.backgroundUrl).width('100%')
.objectFit(ImageFit.Cover)
.grayscale(this.GrayManage.get().isMourning() ? 1 : 0)
.onAreaChange((oldValue: Area, newValue: Area) => {
if(typeof newValue?.height == 'number'){
let backImageHeight = newValue?.height
this.backImageHeight = backImageHeight - 40 - this.topRectHeight
console.log("ycg","height===>"+this.backImageHeight)
}
})
}
// 频道分类list
RelativeContainer() {
this.tabBar()
... ... @@ -174,7 +190,9 @@ export struct TopNavigationComponentNew {
channelId: navItem?.channelId + '',
autoRefresh: this.autoRefresh2Page,
isMourning: mourningCheckFn(`${navItem.channelId}`),
bottomNavi:bottomNavi
bottomNavi:bottomNavi,
onHideBgImage: (isShow:boolean): void => this.onHideBgImage(isShow),
scrollBgHeight: this.backImageHeight
})
// .margin({
// left: 6,
... ... @@ -184,7 +202,7 @@ export struct TopNavigationComponentNew {
// topLeft: 6,
// topRight: 6
// })
.backgroundColor(CompUtils.isRMH(this.navItem) || CompUtils.isNews(this.navItem) ? Color.White : Color.Transparent)
.backgroundColor((CompUtils.isRMH(this.navItem) || (CompUtils.isNews(this.navItem) && StringUtils.isEmpty(this.navItem.backgroundUrl) )) ? Color.White : ((this.isHideBackgroundImage && (CompUtils.isRMH(this.navItem) || CompUtils.isNews(this.navItem))) ? Color.White : Color.Transparent))
}
/**
... ... @@ -272,8 +290,8 @@ export struct TopNavigationComponentNew {
tabBar() {
// 顶部背景图
Image(this.navItem.backgroundUrl).width('100%').height('100%')
.grayscale(this.GrayManage.get().isMourning() ? 1 : 0)
// Image(this.navItem.backgroundUrl).width('100%').height('100%')
// .grayscale(this.GrayManage.get().isMourning() ? 1 : 0)
if (CompUtils.isNews(this.navItem)) {
// 顶部搜索、日报logo、早晚报
... ... @@ -858,4 +876,8 @@ export struct TopNavigationComponentNew {
}
}
onHideBgImage(isShow:boolean){
this.isHideBackgroundImage = isShow
}
}
\ No newline at end of file
... ...
... ... @@ -108,21 +108,25 @@ export struct TopPlayComponent {
this.resizeWindow()
if (this.liveDetailPageLogic.livingNeedShowNoWifiTip()) {
this.livingDialogToast = new CustomDialogController({
builder: CustomToast({
bgColor: 0xB3000000,
opacityValue: 1,
fontSizeValue: "25lpx",
lineHeightValue: "36lpx",
msg: "正在使用非Wi-Fi网络,播放将产生流量费用",
marginTop:211/2+px2vp(this.topSafeHeight)-px2vp(84/2)
}),
autoCancel: false,
alignment: DialogAlignment.Top,
customStyle: true,
maskColor: "#00000000"
onlyWifiLoadVideo().then((onlyWifiLoadVideo) => {
if (!onlyWifiLoadVideo) {
this.livingDialogToast = new CustomDialogController({
builder: CustomToast({
bgColor: 0xB3000000,
opacityValue: 1,
fontSizeValue: "25lpx",
lineHeightValue: "36lpx",
msg: "正在使用非Wi-Fi网络,播放将产生流量费用",
marginTop:211/2+px2vp(this.topSafeHeight)-px2vp(84/2)
}),
autoCancel: false,
alignment: DialogAlignment.Top,
customStyle: true,
maskColor: "#00000000"
})
this.livingDialogToast.open()
}
})
this.livingDialogToast.open()
} else if (this.liveDetailPageLogic.noLivingNeedShowNoWifiTip()) {
onlyWifiLoadVideo().then((onlyWifiLoadVideo) => {
if (!onlyWifiLoadVideo) {
... ...
... ... @@ -8,7 +8,7 @@
"version": "1.0.0",
"dependencies": {
"wdKit": "file:../../commons/wdKit",
"premierlibrary": "file:./libs/premierlibrary.har",
"premierlibrary": "file:./libs/premierlibrary_20241008.har",
"wdTracking": "file:../wdTracking",
"wdBean": "file:../../features/wdBean"
}
... ...