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
yuzhilin
2024-05-08 15:16:02 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2ecc1ea0362b95ea1a85e9db518f0a1daa98b3c4
2ecc1ea0
1 parent
2a6bc0d2
fix:16696 篇头跳转缺少交互
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
4 deletions
sight_harmony/commons/wdWebComponent/src/main/ets/pages/JsBridgeBiz.ets
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextPageComponent.ets
sight_harmony/commons/wdWebComponent/src/main/ets/pages/JsBridgeBiz.ets
View file @
2ecc1ea
...
...
@@ -38,6 +38,17 @@ class AppLoginAuthInfo {
Authorization: string = ''
}
interface IDataJson {
jumpType:number
jumpUrl:string
newsId:string
newsObjectLevel:string
newsObjectType:number
newsRelId:string
newsTitle:string
pageId:string
}
/**
* h5调用native代码
* @param data
...
...
@@ -121,6 +132,16 @@ function handleJsCallReceiveH5Data(data: Message) {
case '5':
ProcessUtils.processPage(JSON.parse(data?.data?.dataJson || '{}'))
break;
case '6':
let contentJson: IDataJson = JSON.parse(data?.data?.dataJson || '{}')
let content: ContentDTO = {
objectId: contentJson?.newsId,
relId: contentJson?.newsRelId,
pageId: contentJson?.pageId,
objectType: String(contentJson?.newsObjectType)
} as ContentDTO
ProcessUtils.processPage(content)
break;
default:
break;
}
...
...
@@ -134,7 +155,8 @@ function handleJsCallAppInnerLinkMethod(data: Message) {
relId: urlParams.get('relId') || '',
relType: urlParams.get('relType') || '',
pageId: urlParams.get('pageId') || '',
objectType: ''
objectType: '',
linkUrl: urlParams.get('url') || ''
} as ContentDTO
if (urlParams.get('skipType') === '1') {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextPageComponent.ets
View file @
2ecc1ea
...
...
@@ -105,13 +105,13 @@ export struct ImageAndTextPageComponent {
$r('app.media.icon_candle')))
.width(24)
.height(24)
.margin({ right: 5 })
}
if (this.interactData?.likeNum
>
0) {
if (this.interactData?.likeNum
!=
0) {
Text(NumberFormatterUtils.formatNumberWithWan(this.interactData?.likeNum))
.fontSize(16)
.fontColor(this.newsStatusOfUser?.likeStatus === '1' ? '#ED2800' : '#999999')
.fontWeight(500)
.margin({ left: 5 })
}
}
.width(154)
...
...
@@ -303,7 +303,7 @@ export struct ImageAndTextPageComponent {
}
PageRepository.getContentInteract(params).then(res => {
if (res.data) {
this.interactData
=res.data[0]
this.interactData
.likeNum = res.data[0]?.likeNum
}
})
}
...
...
Please
register
or
login
to post a comment