王士厅

【穿越测试】后台未设置支持语音播报,客户端展示语音播报按钮

@@ -20,6 +20,8 @@ export struct CarderInteraction { @@ -20,6 +20,8 @@ export struct CarderInteraction {
20 @Provide contentDetailData: ContentDetailDTO = {} as ContentDetailDTO 20 @Provide contentDetailData: ContentDetailDTO = {} as ContentDetailDTO
21 @State newsStatusOfUser: batchLikeAndCollectResult = {} as batchLikeAndCollectResult // 点赞、收藏状态 21 @State newsStatusOfUser: batchLikeAndCollectResult = {} as batchLikeAndCollectResult // 点赞、收藏状态
22 @State likeBean: Record<string, string> = {} 22 @State likeBean: Record<string, string> = {}
  23 + @State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
  24 + @State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以
23 25
24 async aboutToAppear() { 26 async aboutToAppear() {
25 await this.getContentDetailData() 27 await this.getContentDetailData()
@@ -32,6 +34,9 @@ export struct CarderInteraction { @@ -32,6 +34,9 @@ export struct CarderInteraction {
32 this.likeBean['channelId'] = this.contentDetailData.reLInfo?.channelId + '' 34 this.likeBean['channelId'] = this.contentDetailData.reLInfo?.channelId + ''
33 this.contentDTO.shareFlag = this.contentDTO.shareFlag?this.contentDTO.shareFlag:'1' 35 this.contentDTO.shareFlag = this.contentDTO.shareFlag?this.contentDTO.shareFlag:'1'
34 console.log('是否显示分享',this.contentDTO.shareFlag) 36 console.log('是否显示分享',this.contentDTO.shareFlag)
  37 + // 内容用 点赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
  38 + this.likesStyle = this.contentDetailData.likesStyle
  39 + this.openLikes = this.contentDetailData.openLikes == 1 ? true : false
35 } 40 }
36 41
37 build() { 42 build() {
@@ -92,7 +97,7 @@ export struct CarderInteraction { @@ -92,7 +97,7 @@ export struct CarderInteraction {
92 }) 97 })
93 } 98 }
94 } 99 }
95 - .width(42) 100 + .visibility(this.likesStyle == 4 || !this.openLikes ? Visibility.None : Visibility.Visible)
96 } 101 }
97 102
98 /** 103 /**
@@ -78,9 +78,14 @@ export struct DynamicDetailComponent { @@ -78,9 +78,14 @@ export struct DynamicDetailComponent {
78 @State publishCommentModel: publishCommentModel = new publishCommentModel() 78 @State publishCommentModel: publishCommentModel = new publishCommentModel()
79 @State reachEndIncreament: number = 0 79 @State reachEndIncreament: number = 0
80 @State operationButtonList: string[] = [] 80 @State operationButtonList: string[] = []
  81 + @State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
  82 + @State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以
81 83
82 async aboutToAppear() { 84 async aboutToAppear() {
83 await this.getContentDetailData() 85 await this.getContentDetailData()
  86 + // 内容用 点赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
  87 + this.likesStyle = this.contentDetailData.likesStyle
  88 + this.openLikes = this.contentDetailData.openLikes == 1 ? true : false
84 } 89 }
85 90
86 onPageHide() { 91 onPageHide() {
@@ -537,6 +542,7 @@ export struct DynamicDetailComponent { @@ -537,6 +542,7 @@ export struct DynamicDetailComponent {
537 //内容点赞/取消点赞埋点 542 //内容点赞/取消点赞埋点
538 543
539 }) 544 })
  545 + .visibility(this.likesStyle == 4 || !this.openLikes ? Visibility.None : Visibility.Visible)
540 546
541 // 评论 547 // 评论
542 if (this.contentDetailData?.openComment) { 548 if (this.contentDetailData?.openComment) {
@@ -25,6 +25,7 @@ export struct LikeComponent { @@ -25,6 +25,7 @@ export struct LikeComponent {
25 @Prop pageComponentType: number 25 @Prop pageComponentType: number
26 @State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 26 @State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
27 @State likeStatus: boolean = false 27 @State likeStatus: boolean = false
  28 + @State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以
28 viewModel: LikeViewModel = new LikeViewModel() 29 viewModel: LikeViewModel = new LikeViewModel()
29 @Prop @Watch('onDataUpdated') data: Record<string, string> 30 @Prop @Watch('onDataUpdated') data: Record<string, string>
30 enableBtn = true 31 enableBtn = true
@@ -42,16 +43,22 @@ export struct LikeComponent { @@ -42,16 +43,22 @@ export struct LikeComponent {
42 // this.data['userHeaderUrl'] = "" 43 // this.data['userHeaderUrl'] = ""
43 // this.data['channelId'] = "2059" //必须 44 // this.data['channelId'] = "2059" //必须
44 // this.data['status'] = "1" 45 // this.data['status'] = "1"
45 - 46 + // 内容用 是否开启点赞 1是 0否;
  47 + // this.contentDetailData.openLikes == 1
46 aboutToAppear() { 48 aboutToAppear() {
47 // 2:竖屏直播页 3:图集 4:横屏直播页 49 // 2:竖屏直播页 3:图集 4:横屏直播页
48 if(this.pageComponentType == 2 || this.pageComponentType == 4) { 50 if(this.pageComponentType == 2 || this.pageComponentType == 4) {
49 // 点赞样式 love爱心型 thumb点赞手势 mourning 蜡烛(默哀) pray 祈福 51 // 点赞样式 love爱心型 thumb点赞手势 mourning 蜡烛(默哀) pray 祈福
50 this.likesStyle = this.contentDetailData?.liveInfo?.likesStyle 52 this.likesStyle = this.contentDetailData?.liveInfo?.likesStyle
  53 + this.openLikes = this.contentDetailData?.liveInfo?.likeEnable == 1 ? true : false
51 } else { 54 } else {
52 // 内容用 点赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 55 // 内容用 点赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
53 this.likesStyle = this.contentDetailData.likesStyle 56 this.likesStyle = this.contentDetailData.likesStyle
  57 + this.openLikes = this.contentDetailData.openLikes == 1 ? true : false
54 } 58 }
  59 + console.log(TAG, 'this.contentDetailData', JSON.stringify(this.contentDetailData))
  60 + console.log(TAG, 'this.likesStyle', this.likesStyle)
  61 + console.log(TAG, 'this.openLikes', this.openLikes)
55 this.onDataUpdated() 62 this.onDataUpdated()
56 this.contentTrackingDict() 63 this.contentTrackingDict()
57 } 64 }
@@ -176,7 +183,7 @@ export struct LikeComponent { @@ -176,7 +183,7 @@ export struct LikeComponent {
176 } 183 }
177 .width(154) 184 .width(154)
178 .height(40) 185 .height(40)
179 - .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' ? Visibility.None : Visibility.Visible) 186 + .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' || !this.openLikes ? Visibility.None : Visibility.Visible)
180 } 187 }
181 188
182 @Builder 189 @Builder
@@ -194,7 +201,7 @@ export struct LikeComponent { @@ -194,7 +201,7 @@ export struct LikeComponent {
194 .onClick(() => { 201 .onClick(() => {
195 this.clickButtonEvent() 202 this.clickButtonEvent()
196 }) 203 })
197 - .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' ? Visibility.None : Visibility.Visible) 204 + .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' || !this.openLikes ? Visibility.None : Visibility.Visible)
198 } 205 }
199 206
200 @Builder 207 @Builder
@@ -211,7 +218,7 @@ export struct LikeComponent { @@ -211,7 +218,7 @@ export struct LikeComponent {
211 } 218 }
212 .width(24) 219 .width(24)
213 .height(24) 220 .height(24)
214 - .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' ? Visibility.None : Visibility.Visible) 221 + .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' || !this.openLikes ? Visibility.None : Visibility.Visible)
215 } 222 }
216 223
217 @Builder 224 @Builder
@@ -286,7 +293,7 @@ export struct LikeComponent { @@ -286,7 +293,7 @@ export struct LikeComponent {
286 }.width(24).height(24).onClick(() => { 293 }.width(24).height(24).onClick(() => {
287 this.clickButtonEvent() 294 this.clickButtonEvent()
288 }) 295 })
289 - .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' ? Visibility.None : Visibility.Visible) 296 + .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' || !this.openLikes ? Visibility.None : Visibility.Visible)
290 } 297 }
291 298
292 @Builder 299 @Builder
@@ -323,7 +330,7 @@ export struct LikeComponent { @@ -323,7 +330,7 @@ export struct LikeComponent {
323 } 330 }
324 .width(36) 331 .width(36)
325 .height(42) 332 .height(42)
326 - .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' ? Visibility.None : Visibility.Visible) 333 + .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' || !this.openLikes ? Visibility.None : Visibility.Visible)
327 334
328 } 335 }
329 336
@@ -75,7 +75,6 @@ export struct OperRowListView { @@ -75,7 +75,6 @@ export struct OperRowListView {
75 */ 75 */
76 @Prop pageComponentType?: number = -1 76 @Prop pageComponentType?: number = -1
77 @Prop showBackIcon?: boolean = true 77 @Prop showBackIcon?: boolean = true
78 - @State likesStyle: number = this.contentDetailData.likesStyle // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空  
79 @Prop operationButtonList?: string[] = ['comment', 'collect', 'share'] // 组件展示条件 78 @Prop operationButtonList?: string[] = ['comment', 'collect', 'share'] // 组件展示条件
80 @State needLike: boolean = true 79 @State needLike: boolean = true
81 @ObjectLink publishCommentModel: publishCommentModel 80 @ObjectLink publishCommentModel: publishCommentModel
@@ -94,6 +93,8 @@ export struct OperRowListView { @@ -94,6 +93,8 @@ export struct OperRowListView {
94 @State dialogController: CustomDialogController | null = null; 93 @State dialogController: CustomDialogController | null = null;
95 pageParam: ParamType = {} 94 pageParam: ParamType = {}
96 PageName: string = '' 95 PageName: string = ''
  96 + @State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
  97 + @State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以
97 98
98 async aboutToAppear() { 99 async aboutToAppear() {
99 console.info(TAG, 'this.needLike', this.needLike) 100 console.info(TAG, 'this.needLike', this.needLike)
@@ -113,6 +114,17 @@ export struct OperRowListView { @@ -113,6 +114,17 @@ export struct OperRowListView {
113 } 114 }
114 }) 115 })
115 this.contentTrackingDict() 116 this.contentTrackingDict()
  117 +
  118 + // 2:竖屏直播页 3:图集 4:横屏直播页
  119 + if(this.pageComponentType == 2 || this.pageComponentType == 4) {
  120 + // 点赞样式 love爱心型 thumb点赞手势 mourning 蜡烛(默哀) pray 祈福
  121 + this.likesStyle = this.contentDetailData?.liveInfo?.likesStyle
  122 + this.openLikes = this.contentDetailData?.liveInfo?.likeEnable == 1 ? true : false
  123 + } else {
  124 + // 内容用 点赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
  125 + this.likesStyle = this.contentDetailData.likesStyle
  126 + this.openLikes = this.contentDetailData.openLikes == 1 ? true : false
  127 + }
116 } 128 }
117 129
118 contentTrackingDict(){ 130 contentTrackingDict(){
@@ -170,6 +182,7 @@ export struct OperRowListView { @@ -170,6 +182,7 @@ export struct OperRowListView {
170 } 182 }
171 console.info(TAG, 'contentDetailData----', JSON.stringify(this.contentDetailData)) 183 console.info(TAG, 'contentDetailData----', JSON.stringify(this.contentDetailData))
172 console.info(TAG, 'likeBean----', JSON.stringify(this.likeBean)) 184 console.info(TAG, 'likeBean----', JSON.stringify(this.likeBean))
  185 + console.info(TAG, 'this.operationButtonList', JSON.stringify(this.operationButtonList))
173 // 评论需要数据 186 // 评论需要数据
174 /* this.publishCommentModel.targetId = this.contentDetailData.newsId + '' 187 /* this.publishCommentModel.targetId = this.contentDetailData.newsId + ''
175 this.publishCommentModel.targetRelId = this.contentDetailData.reLInfo?.relId + '' 188 this.publishCommentModel.targetRelId = this.contentDetailData.reLInfo?.relId + ''
@@ -305,19 +318,16 @@ export struct OperRowListView { @@ -305,19 +318,16 @@ export struct OperRowListView {
305 */ 318 */
306 @Builder 319 @Builder
307 builderLike() { 320 builderLike() {
308 - // 点赞根据字段判断是否显示待添加  
309 Column() { 321 Column() {
310 - // if (this.likeBean?.contentId) {  
311 LikeComponent({ 322 LikeComponent({
312 data: this.likeBean, 323 data: this.likeBean,
313 styleType: this.styleType, 324 styleType: this.styleType,
314 componentType: this.componentType, 325 componentType: this.componentType,
315 pageComponentType: this.pageComponentType 326 pageComponentType: this.pageComponentType
316 }) 327 })
317 - // }  
318 } 328 }
319 .width(48) 329 .width(48)
320 - .visibility(this.likesStyle !== 4 ? Visibility.Visible : Visibility.None) 330 + .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' || !this.openLikes ? Visibility.None : Visibility.Visible)
321 } 331 }
322 332
323 /** 333 /**