Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
chenquansheng
2024-09-12 19:30:41 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9143347dafb9b3e4d4f5eceee8346fe3430d595e
9143347d
1 parent
0577cb04
fix |> 修复点击右上角专题板块下拉按钮,展示全部板块,鸿蒙蒙层没有到底
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
87 additions
and
48 deletions
sight_harmony/commons/wdJsBridge/src/main/ets/bean/Message.ets
sight_harmony/commons/wdWebComponent/src/main/ets/pages/WdWebComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/SpacialTopicPageComponent.ets
sight_harmony/commons/wdJsBridge/src/main/ets/bean/Message.ets
View file @
9143347
...
...
@@ -40,6 +40,7 @@ interface dataObject {
videoLandscape?: string
imgListData?: string
statusBarMode?: string
color?:string
}
/**
...
...
sight_harmony/commons/wdWebComponent/src/main/ets/pages/WdWebComponent.ets
View file @
9143347
...
...
@@ -16,7 +16,7 @@ export struct WdWebComponent {
webviewControl: BridgeWebViewControl = new BridgeWebViewControl()
onWebPrepared: () => void = () => {
}
receiveH5SendToNativeData: (data
String: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
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/SpacialTopicPageComponent.ets
View file @
9143347
...
...
@@ -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)
}
...
...
Please
register
or
login
to post a comment