xugenyuan

fix |> (文章配置使用外链),详情页顶部缺少标题;互动区不应显示语音播报按钮

http://192.168.1.3:8080/zentao/bug-view-20517.html

Signed-off-by: xugenyuan <xugenyuan@wondertek.com.cn>
@@ -42,7 +42,7 @@ export struct H5NewsWebPageComponent { @@ -42,7 +42,7 @@ export struct H5NewsWebPageComponent {
42 action: Action = {} as Action 42 action: Action = {} as Action
43 @State webUrl: string = ''; 43 @State webUrl: string = '';
44 @Provide contentDetailData: ContentDetailDTO = {} as ContentDetailDTO 44 @Provide contentDetailData: ContentDetailDTO = {} as ContentDetailDTO
45 - @State recommendList: ContentDTO[] = [] 45 + // @State recommendList: ContentDTO[] = []
46 @State newsStatusOfUser: batchLikeAndCollectResult | undefined = undefined // 点赞、收藏状态 46 @State newsStatusOfUser: batchLikeAndCollectResult | undefined = undefined // 点赞、收藏状态
47 @State interactData: InteractDataDTO = {} as InteractDataDTO 47 @State interactData: InteractDataDTO = {} as InteractDataDTO
48 @State isPageEnd: boolean = false 48 @State isPageEnd: boolean = false
@@ -58,7 +58,7 @@ export struct H5NewsWebPageComponent { @@ -58,7 +58,7 @@ export struct H5NewsWebPageComponent {
58 @State showCommentList: boolean = false 58 @State showCommentList: boolean = false
59 @State index: number = 0 59 @State index: number = 0
60 @State currentIndex: number = 0 60 @State currentIndex: number = 0
61 - private navTitle = '人民日报'; 61 + @State navTitle: string = ""
62 62
63 build() { 63 build() {
64 Stack({ alignContent: Alignment.Top }){ 64 Stack({ alignContent: Alignment.Top }){
@@ -137,13 +137,14 @@ export struct H5NewsWebPageComponent { @@ -137,13 +137,14 @@ export struct H5NewsWebPageComponent {
137 console.log(TAG, "dl1111111111", JSON.stringify(detailBeans[0])) 137 console.log(TAG, "dl1111111111", JSON.stringify(detailBeans[0]))
138 if (detailBeans && detailBeans.length > 0) { 138 if (detailBeans && detailBeans.length > 0) {
139 this.contentDetailData = detailBeans[0]; 139 this.contentDetailData = detailBeans[0];
  140 + this.navTitle = this.contentDetailData.newsTitle
140 let dateTime = 141 let dateTime =
141 DateTimeUtils.parseDate(this.contentDetailData?.publishTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN); 142 DateTimeUtils.parseDate(this.contentDetailData?.publishTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN);
142 // let _publishTime = DateTimeUtils.formatDate(dateTime, PATTERN_DATE_CN_RN) 143 // let _publishTime = DateTimeUtils.formatDate(dateTime, PATTERN_DATE_CN_RN)
143 // this.publishTime = DateTimeUtils.removeTrailingZeros(_publishTime) 144 // this.publishTime = DateTimeUtils.removeTrailingZeros(_publishTime)
144 - if (this.contentDetailData?.recommendShow === 1) {  
145 - this.getRecommend()  
146 - } 145 + // if (this.contentDetailData?.recommendShow === 1) {
  146 + // this.getRecommend()
  147 + // }
147 if (this.contentDetailData?.openLikes === 1) { 148 if (this.contentDetailData?.openLikes === 1) {
148 console.log(TAG, '点赞this.getInteractDataStatus()') 149 console.log(TAG, '点赞this.getInteractDataStatus()')
149 this.getInteractDataStatus() 150 this.getInteractDataStatus()
@@ -167,10 +168,10 @@ export struct H5NewsWebPageComponent { @@ -167,10 +168,10 @@ export struct H5NewsWebPageComponent {
167 if (this.contentDetailData.openLikes === 1) { 168 if (this.contentDetailData.openLikes === 1) {
168 this.operationButtonList.push('like') 169 this.operationButtonList.push('like')
169 } 170 }
170 - if (this.contentDetailData?.openAudio && this.contentDetailData?.audioList?.length &&  
171 - this.contentDetailData?.audioList[0].audioUrl) {  
172 - this.operationButtonList.push('listen')  
173 - } 171 + // if (this.contentDetailData?.openAudio && this.contentDetailData?.audioList?.length &&
  172 + // this.contentDetailData?.audioList[0].audioUrl) {
  173 + // this.operationButtonList.push('listen')
  174 + // }
174 this.operationButtonList.push('collect') 175 this.operationButtonList.push('collect')
175 if (this.contentDetailData.shareInfo?.shareOpen === 1) { 176 if (this.contentDetailData.shareInfo?.shareOpen === 1) {
176 this.operationButtonList.push('share') 177 this.operationButtonList.push('share')
@@ -179,23 +180,23 @@ export struct H5NewsWebPageComponent { @@ -179,23 +180,23 @@ export struct H5NewsWebPageComponent {
179 } 180 }
180 } 181 }
181 182
182 - private async getRecommend() {  
183 - let params: postRecommendListParams = {  
184 - imei: HttpUtils.getImei(),  
185 - userId: HttpUtils.getUserId(),  
186 - contentId: String(this.contentDetailData?.newsId),  
187 - recType: 1,  
188 - contentType: this.contentDetailData?.newsType,  
189 - relId: this.contentDetailData?.reLInfo?.relId,  
190 - // channelId: String(this.contentDetailData?.reLInfo?.channelId)  
191 - }  
192 - let recommendList = await DetailViewModel.postRecommendList(params)  
193 - if (recommendList.length > 0) {  
194 - //推荐列表过滤音频和活动入口  
195 - this.recommendList = recommendList.filter(item => item.objectType !== '3' && item.objectType !== '13');  
196 - }  
197 -  
198 - } 183 + // private async getRecommend() {
  184 + // let params: postRecommendListParams = {
  185 + // imei: HttpUtils.getImei(),
  186 + // userId: HttpUtils.getUserId(),
  187 + // contentId: String(this.contentDetailData?.newsId),
  188 + // recType: 1,
  189 + // contentType: this.contentDetailData?.newsType,
  190 + // relId: this.contentDetailData?.reLInfo?.relId,
  191 + // // channelId: String(this.contentDetailData?.reLInfo?.channelId)
  192 + // }
  193 + // let recommendList = await DetailViewModel.postRecommendList(params)
  194 + // if (recommendList.length > 0) {
  195 + // //推荐列表过滤音频和活动入口
  196 + // this.recommendList = recommendList.filter(item => item.objectType !== '3' && item.objectType !== '13');
  197 + // }
  198 + //
  199 + // }
199 200
200 // 已登录->查询用户对作品点赞、收藏状态 201 // 已登录->查询用户对作品点赞、收藏状态
201 private async getInteractDataStatus() { 202 private async getInteractDataStatus() {
@@ -3,7 +3,7 @@ import router from '@ohos.router' @@ -3,7 +3,7 @@ import router from '@ohos.router'
3 @Component 3 @Component
4 export struct CustomTitleUI { 4 export struct CustomTitleUI {
5 imgBack:boolean = true 5 imgBack:boolean = true
6 - titleName:ResourceStr = "默认标题" 6 + @Prop titleName: ResourceStr = ""
7 @Prop percent:number = 1 7 @Prop percent:number = 1
8 isShowBottomLine:boolean = false 8 isShowBottomLine:boolean = false
9 9