chenquansheng

fix |> 修复点击右上角专题板块下拉按钮,展示全部板块,鸿蒙蒙层没有到底

... ... @@ -40,6 +40,7 @@ interface dataObject {
videoLandscape?: string
imgListData?: string
statusBarMode?: string
color?:string
}
/**
... ...
... ... @@ -16,7 +16,7 @@ export struct WdWebComponent {
webviewControl: BridgeWebViewControl = new BridgeWebViewControl()
onWebPrepared: () => void = () => {
}
receiveH5SendToNativeData: (dataString:string | undefined) => void = () =>{
receiveH5SendToNativeData: (data: Message | undefined) => void = () =>{
}
@Prop isDefaultPage: boolean = false;
... ... @@ -96,7 +96,7 @@ export struct WdWebComponent {
}
if (data.handlerName === H5CallNativeType.jsCall_receiveH5Data) {
if (data.data?.dataSource === WDH5WebDataSource.WDH5WebDataSourceTopicPageInfo) {
this.receiveH5SendToNativeData(data.data?.dataJson)
this.receiveH5SendToNativeData(data)
return
}
}
... ... @@ -110,6 +110,13 @@ export struct WdWebComponent {
private jsCall_currentPageOperate(data: Message) {
if (data.data?.operateType == WDH5WebPageOperationType.WDH5WebPageOperationTypeSetStatusBar) {
WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: data.data?.statusBarMode =='2'?'#ffffff':'#000000'})
return
}
if (data.data?.operateType == WDH5WebPageOperationType.WDH5WebPageOperationTypeBottomBarMaskViewShow ||
data.data?.operateType == WDH5WebPageOperationType.WDH5WebPageOperationTypeBottomBarMaskViewHidden) {
this.receiveH5SendToNativeData(data)
return
}
}
... ...
... ... @@ -26,6 +26,7 @@ import PageAdModel from '../viewmodel/PageAdvModel';
import { ProcessUtils } from 'wdRouter/Index';
import { GrayManageModel } from '../viewmodel/GrayManageModel';
import router from '@ohos.router';
import { Message,WDH5WebDataSource,WDH5WebPageOperationType } from 'wdJsBridge/src/main/ets/bean/Message';
const TAG: string = 'SpacialTopicPageComponent'
... ... @@ -58,6 +59,8 @@ export struct SpacialTopicPageComponent {
@State private pageAdvModel: PageAdModel = new PageAdModel();
@State shareInfo: ShareInfoDTO = {} as ShareInfoDTO
@State showBottomView: boolean = false;
@State showBottomMaskView: boolean = false;
@State bgColor: ResourceColor = ''
@State executedStartTime: number = new Date().getTime()
// 国殇灰度管理
... ... @@ -84,14 +87,17 @@ export struct SpacialTopicPageComponent {
})
}
private receiveH5SendToNativeData(dataString: string | undefined) {
// this.topicDetail = JSON.parse(dataString);
if (dataString == undefined) {
private receiveH5SendToNativeData(data: Message | undefined) {
if (data == undefined) {
return
}
Logger.debug('SpacialTopicPageComponent111', dataString);
this.topicDetail = JSON.parse(dataString);
if (data.data?.dataSource === WDH5WebDataSource.WDH5WebDataSourceTopicPageInfo) {
if (data.data?.dataJson == undefined) {
return
}
this.topicDetail = JSON.parse(data.data?.dataJson);
this.topicInfo = this.topicDetail.topicInfo;
this.pageAdvModel.analysisTopicAdvSource(this.topicDetail)
if (this.topicInfo) {
... ... @@ -134,6 +140,24 @@ export struct SpacialTopicPageComponent {
}
// this.viewBlogInsightIntentShare();
return
}
if (data.data?.operateType == WDH5WebPageOperationType.WDH5WebPageOperationTypeBottomBarMaskViewShow) {
if (data.data?.color == undefined){
this.bgColor = '#80000000'
}else {
this.bgColor = data.data?.color
}
this.showBottomMaskView = true
return
}
if (data.data?.operateType == WDH5WebPageOperationType.WDH5WebPageOperationTypeBottomBarMaskViewHidden) {
this.showBottomMaskView = false
return
}
}
//意图上报
... ... @@ -235,6 +259,13 @@ export struct SpacialTopicPageComponent {
interactData: $interactData,
}).visibility(this.showComment ? Visibility.Visible : Visibility.Hidden)
}
if (this.showBottomMaskView){
Column()
.width('100%')
.backgroundColor(this.bgColor)
.height(75)
}
}
}.width(CommonConstants.FULL_WIDTH).height(CommonConstants.FULL_HEIGHT)
}
... ...