王士厅

全局规则-人民号管理端关闭稿件分享开关,号主文章、视频、图集、动态稿件不应展示分享按钮

@@ -44,7 +44,7 @@ export struct CarderInteraction { @@ -44,7 +44,7 @@ export struct CarderInteraction {
44 44
45 build() { 45 build() {
46 Row() { 46 Row() {
47 - if(this.contentDTO.shareFlag === '1'){ 47 + if(this.contentDetailData?.shareInfo?.shareOpen === 1){
48 Row() { 48 Row() {
49 Image($r('app.media.CarderInteraction_share')) 49 Image($r('app.media.CarderInteraction_share'))
50 .width(18) 50 .width(18)
@@ -60,14 +60,9 @@ export struct CarderInteraction { @@ -60,14 +60,9 @@ export struct CarderInteraction {
60 }) 60 })
61 } 61 }
62 62
63 - if(this.contentDTO.rmhInfo != null){  
64 - if(this.contentDTO.shareInfo != null && 1 == this.contentDTO.shareInfo.shareOpen && 1 == this.contentDTO.rmhInfo.cnShareControl){  
65 - this.commentLayout()  
66 - }  
67 - }else{ 63 + if(this.contentDetailData?.openComment == 1){
68 this.commentLayout() 64 this.commentLayout()
69 } 65 }
70 -  
71 this.builderLike() 66 this.builderLike()
72 } 67 }
73 .width('100%') 68 .width('100%')
@@ -156,6 +156,7 @@ export struct OperRowListView { @@ -156,6 +156,7 @@ export struct OperRowListView {
156 this.likeBean['contentRelId'] = this.contentDetailData?.reLInfo?.relId + '' 156 this.likeBean['contentRelId'] = this.contentDetailData?.reLInfo?.relId + ''
157 } 157 }
158 console.info(TAG, 'contentDetailData----', JSON.stringify(this.contentDetailData)) 158 console.info(TAG, 'contentDetailData----', JSON.stringify(this.contentDetailData))
  159 + console.info(TAG, 'this.contentDetailData.shareInfo.shareOpen', JSON.stringify(this.contentDetailData.shareInfo.shareOpen))
159 console.info(TAG, 'likeBean----', JSON.stringify(this.likeBean)) 160 console.info(TAG, 'likeBean----', JSON.stringify(this.likeBean))
160 console.info(TAG, 'this.operationButtonList', JSON.stringify(this.operationButtonList)) 161 console.info(TAG, 'this.operationButtonList', JSON.stringify(this.operationButtonList))
161 162
@@ -384,22 +385,24 @@ export struct OperRowListView { @@ -384,22 +385,24 @@ export struct OperRowListView {
384 */ 385 */
385 @Builder 386 @Builder
386 builderShare() { 387 builderShare() {
387 - Column() {  
388 - Image(this.styleType == 1 ? $r('app.media.iv_live_comment_share') :  
389 - $r('app.media.iv_live_comment_share_white'))  
390 - .width(24)  
391 - .height(24)  
392 - .aspectRatio(1)  
393 - .interpolation(ImageInterpolation.High)  
394 - .onClick((event: ClickEvent) => {  
395 - this.share()  
396 - }) 388 + if(this.contentDetailData?.shareInfo?.shareOpen == 1) {
  389 + Column() {
  390 + Image(this.styleType == 1 ? $r('app.media.iv_live_comment_share') :
  391 + $r('app.media.iv_live_comment_share_white'))
  392 + .width(24)
  393 + .height(24)
  394 + .aspectRatio(1)
  395 + .interpolation(ImageInterpolation.High)
  396 + .onClick((event: ClickEvent) => {
  397 + this.share()
  398 + })
  399 + }
  400 + .justifyContent(FlexAlign.Center)
  401 + .height(36)
  402 + .width(48)
  403 + .borderRadius(18)
  404 + .backgroundColor(this.pageComponentType === 2 ? '#4D000000' : Color.Transparent)
397 } 405 }
398 - .justifyContent(FlexAlign.Center)  
399 - .height(36)  
400 - .width(48)  
401 - .borderRadius(18)  
402 - .backgroundColor(this.pageComponentType === 2 ? '#4D000000' : Color.Transparent)  
403 } 406 }
404 407
405 handleStyle() { 408 handleStyle() {
@@ -208,12 +208,16 @@ export struct PlayerRightView { @@ -208,12 +208,16 @@ export struct PlayerRightView {
208 build() { 208 build() {
209 Column() { 209 Column() {
210 this.userBuilderView() 210 this.userBuilderView()
211 - this.likeBuilderView() 211 + if (this.contentDetailData?.openLikes == 1) {
  212 + this.likeBuilderView()
  213 + }
212 this.collectBuilderView() 214 this.collectBuilderView()
213 - if (this.contentDetailData.openComment == 1) { 215 + if (this.contentDetailData?.openComment == 1) {
214 this.commentBuilderView() 216 this.commentBuilderView()
215 } 217 }
216 - this.shareBuilderView() 218 + if(this.contentDetailData?.shareInfo?.shareOpen == 1) {
  219 + this.shareBuilderView()
  220 + }
217 } 221 }
218 // .backgroundColor(Color.Blue) 222 // .backgroundColor(Color.Blue)
219 // .height('100%') 223 // .height('100%')