yuzhilin

fix:16696 篇头跳转缺少交互

... ... @@ -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') {
... ...
... ... @@ -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
}
})
}
... ...