陈剑华

feat: 直播横划卡右滑展示更多逻辑

@@ -50,6 +50,16 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { @@ -50,6 +50,16 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
50 50
51 toMore() { 51 toMore() {
52 if (this.moreWidth > this.initMoreWidth * 2) { 52 if (this.moreWidth > this.initMoreWidth * 2) {
  53 + this.liveToMore();
  54 + }
  55 + }
  56 +
  57 + liveToMore() {
  58 + if (!!this.compDTO.dataSourceType) {
  59 + if (this.compDTO.dataSourceType === 'OBJECT_POS') {
  60 + ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle)
  61 + return;
  62 + }
53 if (this.compDTO.linkUrl) { 63 if (this.compDTO.linkUrl) {
54 let taskAction: Action = { 64 let taskAction: Action = {
55 type: 'JUMP_H5_BY_WEB_VIEW', 65 type: 'JUMP_H5_BY_WEB_VIEW',
@@ -61,9 +71,24 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { @@ -61,9 +71,24 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
61 } else { 71 } else {
62 this.jumpToLiveMorePage() 72 this.jumpToLiveMorePage()
63 } 73 }
  74 + } else {
  75 + if (this.compDTO?.objectType === '11') {
  76 + } else {
  77 + const contentDTO: ContentDTO = {
  78 + objectId: this.compDTO.objectId,
  79 + objectType: this.compDTO.objectType,
  80 + linkUrl: this.compDTO.linkUrl,
  81 + pageId: this.compDTO.pageId
  82 + } as ContentDTO
  83 + ProcessUtils.processPage(contentDTO)
  84 + }
64 } 85 }
65 } 86 }
66 87
  88 + showMore() {
  89 + return !!this.compDTO.dataSourceType || !(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')
  90 + }
  91 +
67 build() { 92 build() {
68 Column() { 93 Column() {
69 Row() { 94 Row() {
@@ -87,19 +112,9 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { @@ -87,19 +112,9 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
87 .width(14) 112 .width(14)
88 .height(14) 113 .height(14)
89 } 114 }
90 - .visibility(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '' ? Visibility.None : Visibility.Visible) 115 + .visibility(this.showMore() ? Visibility.Visible : Visibility.None)
91 .onClick(() => { 116 .onClick(() => {
92 - if (this.compDTO.linkUrl) {  
93 - let taskAction: Action = {  
94 - type: 'JUMP_H5_BY_WEB_VIEW',  
95 - params: {  
96 - url: this.compDTO.linkUrl  
97 - } as Params,  
98 - };  
99 - WDRouterRule.jumpWithAction(taskAction)  
100 - } else {  
101 - this.jumpToLiveMorePage()  
102 - } 117 + this.liveToMore();
103 }) 118 })
104 119
105 }.justifyContent(FlexAlign.SpaceBetween) 120 }.justifyContent(FlexAlign.SpaceBetween)
@@ -141,7 +156,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { @@ -141,7 +156,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
141 }) 156 })
142 } 157 }
143 158
144 - if (this.compDTO.operDataList.length >= 2 && !(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')) { 159 + if (this.compDTO.operDataList.length >= 2 && this.showMore()) {
145 Row() { 160 Row() {
146 Ellipse() 161 Ellipse()
147 .width(2* (this.moreWidth - this.initMoreWidth - 1)) 162 .width(2* (this.moreWidth - this.initMoreWidth - 1))