chenquansheng

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

@@ -40,6 +40,7 @@ interface dataObject { @@ -40,6 +40,7 @@ interface dataObject {
40 videoLandscape?: string 40 videoLandscape?: string
41 imgListData?: string 41 imgListData?: string
42 statusBarMode?: string 42 statusBarMode?: string
  43 + color?:string
43 } 44 }
44 45
45 /** 46 /**
@@ -16,7 +16,7 @@ export struct WdWebComponent { @@ -16,7 +16,7 @@ export struct WdWebComponent {
16 webviewControl: BridgeWebViewControl = new BridgeWebViewControl() 16 webviewControl: BridgeWebViewControl = new BridgeWebViewControl()
17 onWebPrepared: () => void = () => { 17 onWebPrepared: () => void = () => {
18 } 18 }
19 - receiveH5SendToNativeData: (dataString:string | undefined) => void = () =>{ 19 + receiveH5SendToNativeData: (data: Message | undefined) => void = () =>{
20 20
21 } 21 }
22 @Prop isDefaultPage: boolean = false; 22 @Prop isDefaultPage: boolean = false;
@@ -96,7 +96,7 @@ export struct WdWebComponent { @@ -96,7 +96,7 @@ export struct WdWebComponent {
96 } 96 }
97 if (data.handlerName === H5CallNativeType.jsCall_receiveH5Data) { 97 if (data.handlerName === H5CallNativeType.jsCall_receiveH5Data) {
98 if (data.data?.dataSource === WDH5WebDataSource.WDH5WebDataSourceTopicPageInfo) { 98 if (data.data?.dataSource === WDH5WebDataSource.WDH5WebDataSourceTopicPageInfo) {
99 - this.receiveH5SendToNativeData(data.data?.dataJson) 99 + this.receiveH5SendToNativeData(data)
100 return 100 return
101 } 101 }
102 } 102 }
@@ -110,6 +110,13 @@ export struct WdWebComponent { @@ -110,6 +110,13 @@ export struct WdWebComponent {
110 private jsCall_currentPageOperate(data: Message) { 110 private jsCall_currentPageOperate(data: Message) {
111 if (data.data?.operateType == WDH5WebPageOperationType.WDH5WebPageOperationTypeSetStatusBar) { 111 if (data.data?.operateType == WDH5WebPageOperationType.WDH5WebPageOperationTypeSetStatusBar) {
112 WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: data.data?.statusBarMode =='2'?'#ffffff':'#000000'}) 112 WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: data.data?.statusBarMode =='2'?'#ffffff':'#000000'})
  113 + return
  114 + }
  115 +
  116 + if (data.data?.operateType == WDH5WebPageOperationType.WDH5WebPageOperationTypeBottomBarMaskViewShow ||
  117 + data.data?.operateType == WDH5WebPageOperationType.WDH5WebPageOperationTypeBottomBarMaskViewHidden) {
  118 + this.receiveH5SendToNativeData(data)
  119 + return
113 } 120 }
114 } 121 }
115 122
@@ -26,6 +26,7 @@ import PageAdModel from '../viewmodel/PageAdvModel'; @@ -26,6 +26,7 @@ import PageAdModel from '../viewmodel/PageAdvModel';
26 import { ProcessUtils } from 'wdRouter/Index'; 26 import { ProcessUtils } from 'wdRouter/Index';
27 import { GrayManageModel } from '../viewmodel/GrayManageModel'; 27 import { GrayManageModel } from '../viewmodel/GrayManageModel';
28 import router from '@ohos.router'; 28 import router from '@ohos.router';
  29 +import { Message,WDH5WebDataSource,WDH5WebPageOperationType } from 'wdJsBridge/src/main/ets/bean/Message';
29 30
30 const TAG: string = 'SpacialTopicPageComponent' 31 const TAG: string = 'SpacialTopicPageComponent'
31 32
@@ -58,6 +59,8 @@ export struct SpacialTopicPageComponent { @@ -58,6 +59,8 @@ export struct SpacialTopicPageComponent {
58 @State private pageAdvModel: PageAdModel = new PageAdModel(); 59 @State private pageAdvModel: PageAdModel = new PageAdModel();
59 @State shareInfo: ShareInfoDTO = {} as ShareInfoDTO 60 @State shareInfo: ShareInfoDTO = {} as ShareInfoDTO
60 @State showBottomView: boolean = false; 61 @State showBottomView: boolean = false;
  62 + @State showBottomMaskView: boolean = false;
  63 + @State bgColor: ResourceColor = ''
61 @State executedStartTime: number = new Date().getTime() 64 @State executedStartTime: number = new Date().getTime()
62 65
63 // 国殇灰度管理 66 // 国殇灰度管理
@@ -84,14 +87,17 @@ export struct SpacialTopicPageComponent { @@ -84,14 +87,17 @@ export struct SpacialTopicPageComponent {
84 }) 87 })
85 } 88 }
86 89
87 - private receiveH5SendToNativeData(dataString: string | undefined) {  
88 - // this.topicDetail = JSON.parse(dataString);  
89 - if (dataString == undefined) { 90 + private receiveH5SendToNativeData(data: Message | undefined) {
  91 +
  92 + if (data == undefined) {
90 return 93 return
91 } 94 }
92 - Logger.debug('SpacialTopicPageComponent111', dataString);  
93 95
94 - this.topicDetail = JSON.parse(dataString); 96 + if (data.data?.dataSource === WDH5WebDataSource.WDH5WebDataSourceTopicPageInfo) {
  97 + if (data.data?.dataJson == undefined) {
  98 + return
  99 + }
  100 + this.topicDetail = JSON.parse(data.data?.dataJson);
95 this.topicInfo = this.topicDetail.topicInfo; 101 this.topicInfo = this.topicDetail.topicInfo;
96 this.pageAdvModel.analysisTopicAdvSource(this.topicDetail) 102 this.pageAdvModel.analysisTopicAdvSource(this.topicDetail)
97 if (this.topicInfo) { 103 if (this.topicInfo) {
@@ -134,6 +140,24 @@ export struct SpacialTopicPageComponent { @@ -134,6 +140,24 @@ export struct SpacialTopicPageComponent {
134 140
135 } 141 }
136 // this.viewBlogInsightIntentShare(); 142 // this.viewBlogInsightIntentShare();
  143 + return
  144 + }
  145 +
  146 + if (data.data?.operateType == WDH5WebPageOperationType.WDH5WebPageOperationTypeBottomBarMaskViewShow) {
  147 +
  148 + if (data.data?.color == undefined){
  149 + this.bgColor = '#80000000'
  150 + }else {
  151 + this.bgColor = data.data?.color
  152 + }
  153 + this.showBottomMaskView = true
  154 + return
  155 + }
  156 +
  157 + if (data.data?.operateType == WDH5WebPageOperationType.WDH5WebPageOperationTypeBottomBarMaskViewHidden) {
  158 + this.showBottomMaskView = false
  159 + return
  160 + }
137 } 161 }
138 162
139 //意图上报 163 //意图上报
@@ -235,6 +259,13 @@ export struct SpacialTopicPageComponent { @@ -235,6 +259,13 @@ export struct SpacialTopicPageComponent {
235 interactData: $interactData, 259 interactData: $interactData,
236 }).visibility(this.showComment ? Visibility.Visible : Visibility.Hidden) 260 }).visibility(this.showComment ? Visibility.Visible : Visibility.Hidden)
237 } 261 }
  262 +
  263 + if (this.showBottomMaskView){
  264 + Column()
  265 + .width('100%')
  266 + .backgroundColor(this.bgColor)
  267 + .height(75)
  268 + }
238 } 269 }
239 }.width(CommonConstants.FULL_WIDTH).height(CommonConstants.FULL_HEIGHT) 270 }.width(CommonConstants.FULL_WIDTH).height(CommonConstants.FULL_HEIGHT)
240 } 271 }