yuzhilin

fix:16696 篇头跳转缺少交互

@@ -38,6 +38,17 @@ class AppLoginAuthInfo { @@ -38,6 +38,17 @@ class AppLoginAuthInfo {
38 Authorization: string = '' 38 Authorization: string = ''
39 } 39 }
40 40
  41 +interface IDataJson {
  42 + jumpType:number
  43 + jumpUrl:string
  44 + newsId:string
  45 + newsObjectLevel:string
  46 + newsObjectType:number
  47 + newsRelId:string
  48 + newsTitle:string
  49 + pageId:string
  50 +}
  51 +
41 /** 52 /**
42 * h5调用native代码 53 * h5调用native代码
43 * @param data 54 * @param data
@@ -121,6 +132,16 @@ function handleJsCallReceiveH5Data(data: Message) { @@ -121,6 +132,16 @@ function handleJsCallReceiveH5Data(data: Message) {
121 case '5': 132 case '5':
122 ProcessUtils.processPage(JSON.parse(data?.data?.dataJson || '{}')) 133 ProcessUtils.processPage(JSON.parse(data?.data?.dataJson || '{}'))
123 break; 134 break;
  135 + case '6':
  136 + let contentJson: IDataJson = JSON.parse(data?.data?.dataJson || '{}')
  137 + let content: ContentDTO = {
  138 + objectId: contentJson?.newsId,
  139 + relId: contentJson?.newsRelId,
  140 + pageId: contentJson?.pageId,
  141 + objectType: String(contentJson?.newsObjectType)
  142 + } as ContentDTO
  143 + ProcessUtils.processPage(content)
  144 + break;
124 default: 145 default:
125 break; 146 break;
126 } 147 }
@@ -134,7 +155,8 @@ function handleJsCallAppInnerLinkMethod(data: Message) { @@ -134,7 +155,8 @@ function handleJsCallAppInnerLinkMethod(data: Message) {
134 relId: urlParams.get('relId') || '', 155 relId: urlParams.get('relId') || '',
135 relType: urlParams.get('relType') || '', 156 relType: urlParams.get('relType') || '',
136 pageId: urlParams.get('pageId') || '', 157 pageId: urlParams.get('pageId') || '',
137 - objectType: '' 158 + objectType: '',
  159 + linkUrl: urlParams.get('url') || ''
138 } as ContentDTO 160 } as ContentDTO
139 if (urlParams.get('skipType') === '1') { 161 if (urlParams.get('skipType') === '1') {
140 162
@@ -105,13 +105,13 @@ export struct ImageAndTextPageComponent { @@ -105,13 +105,13 @@ export struct ImageAndTextPageComponent {
105 $r('app.media.icon_candle'))) 105 $r('app.media.icon_candle')))
106 .width(24) 106 .width(24)
107 .height(24) 107 .height(24)
108 - .margin({ right: 5 })  
109 } 108 }
110 - if (this.interactData?.likeNum > 0) { 109 + if (this.interactData?.likeNum != 0) {
111 Text(NumberFormatterUtils.formatNumberWithWan(this.interactData?.likeNum)) 110 Text(NumberFormatterUtils.formatNumberWithWan(this.interactData?.likeNum))
112 .fontSize(16) 111 .fontSize(16)
113 .fontColor(this.newsStatusOfUser?.likeStatus === '1' ? '#ED2800' : '#999999') 112 .fontColor(this.newsStatusOfUser?.likeStatus === '1' ? '#ED2800' : '#999999')
114 .fontWeight(500) 113 .fontWeight(500)
  114 + .margin({ left: 5 })
115 } 115 }
116 } 116 }
117 .width(154) 117 .width(154)
@@ -303,7 +303,7 @@ export struct ImageAndTextPageComponent { @@ -303,7 +303,7 @@ export struct ImageAndTextPageComponent {
303 } 303 }
304 PageRepository.getContentInteract(params).then(res => { 304 PageRepository.getContentInteract(params).then(res => {
305 if (res.data) { 305 if (res.data) {
306 - this.interactData =res.data[0] 306 + this.interactData.likeNum = res.data[0]?.likeNum
307 } 307 }
308 }) 308 })
309 } 309 }