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,56 +87,77 @@ 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
}
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) {
// 转换详情数据
this.contentDetailData.openComment = Number(this.topicInfo.commentFlag)
this.contentDetailData.commentDisplay = Number(this.topicInfo.commentShowFlag)
this.contentDetailData.newsId = Number(this.topicInfo.topicId)
this.contentDetailData.newsType = this.topicInfo.topicType
this.contentDetailData.newsTitle = this.topicInfo.title;
this.contentDetailData.newsType = this.topicInfo.topicType;
this.contentDetailData.visitorComment = this.topicInfo.visitorComment;
//转换分享数据
this.shareInfo.shareCoverUrl = this.topicInfo.shareCoverUrl
this.shareInfo.shareOpen = this.topicInfo.shareOpen
this.shareInfo.sharePosterCoverUrl = this.topicInfo.sharePosterCoverUrl
this.shareInfo.shareSummary = this.topicInfo.shareSummary
this.shareInfo.shareTitle = this.topicInfo.shareTitle
this.shareInfo.shareUrl = this.topicInfo.shareUrl
this.contentDetailData.shareInfo = this.shareInfo
// if(this.topicInfo.shareOpen === 1){
// if (!this.operationButtonList.includes('share')) {
// this.operationButtonList.push('share');
// }
// } else {
// this.operationButtonList = this.operationButtonList.filter(e =>e !== 'share')
// }
// 转换评论数据
this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '')
this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId || '')
this.publishCommentModel.targetTitle = this.contentDetailData?.newsTitle
this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType || '')
this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId || '')
this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle || '')
this.publishCommentModel.targetType = String(this.contentDetailData?.newsType || '')
this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment || '')
this.showBottomView = true
}
// this.viewBlogInsightIntentShare();
return
}
Logger.debug('SpacialTopicPageComponent111', dataString);
this.topicDetail = JSON.parse(dataString);
this.topicInfo = this.topicDetail.topicInfo;
this.pageAdvModel.analysisTopicAdvSource(this.topicDetail)
if (this.topicInfo) {
// 转换详情数据
this.contentDetailData.openComment = Number(this.topicInfo.commentFlag)
this.contentDetailData.commentDisplay = Number(this.topicInfo.commentShowFlag)
this.contentDetailData.newsId = Number(this.topicInfo.topicId)
this.contentDetailData.newsType = this.topicInfo.topicType
this.contentDetailData.newsTitle = this.topicInfo.title;
this.contentDetailData.newsType = this.topicInfo.topicType;
this.contentDetailData.visitorComment = this.topicInfo.visitorComment;
//转换分享数据
this.shareInfo.shareCoverUrl = this.topicInfo.shareCoverUrl
this.shareInfo.shareOpen = this.topicInfo.shareOpen
this.shareInfo.sharePosterCoverUrl = this.topicInfo.sharePosterCoverUrl
this.shareInfo.shareSummary = this.topicInfo.shareSummary
this.shareInfo.shareTitle = this.topicInfo.shareTitle
this.shareInfo.shareUrl = this.topicInfo.shareUrl
this.contentDetailData.shareInfo = this.shareInfo
// if(this.topicInfo.shareOpen === 1){
// if (!this.operationButtonList.includes('share')) {
// this.operationButtonList.push('share');
// }
// } else {
// this.operationButtonList = this.operationButtonList.filter(e =>e !== 'share')
// }
// 转换评论数据
this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '')
this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId || '')
this.publishCommentModel.targetTitle = this.contentDetailData?.newsTitle
this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType || '')
this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId || '')
this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle || '')
this.publishCommentModel.targetType = String(this.contentDetailData?.newsType || '')
this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment || '')
this.showBottomView = true
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
}
// this.viewBlogInsightIntentShare();
}
//意图上报
... ... @@ -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)
}
... ...