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,56 +87,77 @@ export struct SpacialTopicPageComponent { @@ -84,56 +87,77 @@ 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) {
  93 + return
  94 + }
  95 +
  96 + if (data.data?.dataSource === WDH5WebDataSource.WDH5WebDataSourceTopicPageInfo) {
  97 + if (data.data?.dataJson == undefined) {
  98 + return
  99 + }
  100 + this.topicDetail = JSON.parse(data.data?.dataJson);
  101 + this.topicInfo = this.topicDetail.topicInfo;
  102 + this.pageAdvModel.analysisTopicAdvSource(this.topicDetail)
  103 + if (this.topicInfo) {
  104 + // 转换详情数据
  105 + this.contentDetailData.openComment = Number(this.topicInfo.commentFlag)
  106 + this.contentDetailData.commentDisplay = Number(this.topicInfo.commentShowFlag)
  107 + this.contentDetailData.newsId = Number(this.topicInfo.topicId)
  108 + this.contentDetailData.newsType = this.topicInfo.topicType
  109 + this.contentDetailData.newsTitle = this.topicInfo.title;
  110 + this.contentDetailData.newsType = this.topicInfo.topicType;
  111 + this.contentDetailData.visitorComment = this.topicInfo.visitorComment;
  112 +
  113 + //转换分享数据
  114 + this.shareInfo.shareCoverUrl = this.topicInfo.shareCoverUrl
  115 + this.shareInfo.shareOpen = this.topicInfo.shareOpen
  116 + this.shareInfo.sharePosterCoverUrl = this.topicInfo.sharePosterCoverUrl
  117 + this.shareInfo.shareSummary = this.topicInfo.shareSummary
  118 + this.shareInfo.shareTitle = this.topicInfo.shareTitle
  119 + this.shareInfo.shareUrl = this.topicInfo.shareUrl
  120 + this.contentDetailData.shareInfo = this.shareInfo
  121 +
  122 + // if(this.topicInfo.shareOpen === 1){
  123 + // if (!this.operationButtonList.includes('share')) {
  124 + // this.operationButtonList.push('share');
  125 + // }
  126 + // } else {
  127 + // this.operationButtonList = this.operationButtonList.filter(e =>e !== 'share')
  128 + // }
  129 +
  130 + // 转换评论数据
  131 + this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '')
  132 + this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId || '')
  133 + this.publishCommentModel.targetTitle = this.contentDetailData?.newsTitle
  134 + this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType || '')
  135 + this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId || '')
  136 + this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle || '')
  137 + this.publishCommentModel.targetType = String(this.contentDetailData?.newsType || '')
  138 + this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment || '')
  139 + this.showBottomView = true
  140 +
  141 + }
  142 + // this.viewBlogInsightIntentShare();
90 return 143 return
91 } 144 }
92 - Logger.debug('SpacialTopicPageComponent111', dataString);  
93 -  
94 - this.topicDetail = JSON.parse(dataString);  
95 - this.topicInfo = this.topicDetail.topicInfo;  
96 - this.pageAdvModel.analysisTopicAdvSource(this.topicDetail)  
97 - if (this.topicInfo) {  
98 - // 转换详情数据  
99 - this.contentDetailData.openComment = Number(this.topicInfo.commentFlag)  
100 - this.contentDetailData.commentDisplay = Number(this.topicInfo.commentShowFlag)  
101 - this.contentDetailData.newsId = Number(this.topicInfo.topicId)  
102 - this.contentDetailData.newsType = this.topicInfo.topicType  
103 - this.contentDetailData.newsTitle = this.topicInfo.title;  
104 - this.contentDetailData.newsType = this.topicInfo.topicType;  
105 - this.contentDetailData.visitorComment = this.topicInfo.visitorComment;  
106 -  
107 - //转换分享数据  
108 - this.shareInfo.shareCoverUrl = this.topicInfo.shareCoverUrl  
109 - this.shareInfo.shareOpen = this.topicInfo.shareOpen  
110 - this.shareInfo.sharePosterCoverUrl = this.topicInfo.sharePosterCoverUrl  
111 - this.shareInfo.shareSummary = this.topicInfo.shareSummary  
112 - this.shareInfo.shareTitle = this.topicInfo.shareTitle  
113 - this.shareInfo.shareUrl = this.topicInfo.shareUrl  
114 - this.contentDetailData.shareInfo = this.shareInfo  
115 -  
116 - // if(this.topicInfo.shareOpen === 1){  
117 - // if (!this.operationButtonList.includes('share')) {  
118 - // this.operationButtonList.push('share');  
119 - // }  
120 - // } else {  
121 - // this.operationButtonList = this.operationButtonList.filter(e =>e !== 'share')  
122 - // }  
123 -  
124 - // 转换评论数据  
125 - this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '')  
126 - this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId || '')  
127 - this.publishCommentModel.targetTitle = this.contentDetailData?.newsTitle  
128 - this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType || '')  
129 - this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId || '')  
130 - this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle || '')  
131 - this.publishCommentModel.targetType = String(this.contentDetailData?.newsType || '')  
132 - this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment || '')  
133 - this.showBottomView = true  
134 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
135 } 160 }
136 - // this.viewBlogInsightIntentShare();  
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 }