Showing
4 changed files
with
86 additions
and
69 deletions
| @@ -84,7 +84,64 @@ export struct CompParser { | @@ -84,7 +84,64 @@ export struct CompParser { | ||
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | @Builder | 86 | @Builder |
| 87 | + beforeDevider() { | ||
| 88 | + if ( | ||
| 89 | + this.compDTO.compStyle === CompStyle.Card_09 || | ||
| 90 | + this.compDTO.compStyle === CompStyle.Zh_Single_Column_09 || | ||
| 91 | + this.compDTO.compStyle === CompStyle.Zh_Single_Row_04 || | ||
| 92 | + this.compDTO.compStyle === CompStyle.Zh_Single_Row_06 | ||
| 93 | + ) { | ||
| 94 | + if (this.compDTO.compStyle === this.nextCompDTO.compStyle) { | ||
| 95 | + Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 }) | ||
| 96 | + } else { | ||
| 97 | + Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6}) | ||
| 98 | + } | ||
| 99 | + } | ||
| 100 | + } | ||
| 101 | + | ||
| 102 | + @Builder | ||
| 103 | + behindDevider() { | ||
| 104 | + if ( | ||
| 105 | + this.compDTO.compStyle === CompStyle.Card_09 || | ||
| 106 | + this.compDTO.compStyle === CompStyle.Zh_Single_Column_09 || | ||
| 107 | + this.compDTO.compStyle === CompStyle.Zh_Single_Row_04 || | ||
| 108 | + this.compDTO.compStyle === CompStyle.Zh_Single_Row_06 | ||
| 109 | + ) { | ||
| 110 | + if (this.compDTO.compStyle === this.nextCompDTO.compStyle) { | ||
| 111 | + Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 }) | ||
| 112 | + } else { | ||
| 113 | + Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6}) | ||
| 114 | + } | ||
| 115 | + } else if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) { | ||
| 116 | + Divider().strokeWidth(1).color('#f5f5f5').width('120%').margin({left: -6}) | ||
| 117 | + } else if (this.compDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) { | ||
| 118 | + // 大专题 | ||
| 119 | + if (this.nextCompDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) { | ||
| 120 | + Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 }) | ||
| 121 | + } else { | ||
| 122 | + Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6}) | ||
| 123 | + } | ||
| 124 | + } else if (this.compDTO.compType === 'appStyle' || this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 || this.compDTO.compStyle === CompStyle.Zh_Single_Row_03 || this.compDTO.compStyle === CompStyle.Card_Comp_Adv || this.compDTO.compStyle === CompStyle.Zh_Single_Column_02) { | ||
| 125 | + if ( | ||
| 126 | + this.nextCompDTO.compStyle === CompStyle.Card_09 || | ||
| 127 | + this.nextCompDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10 || | ||
| 128 | + this.nextCompDTO.compStyle === CompStyle.Zh_Single_Column_09 || | ||
| 129 | + this.nextCompDTO.compStyle === CompStyle.Zh_Single_Row_04 || | ||
| 130 | + this.nextCompDTO.compStyle === CompStyle.Zh_Single_Row_06 || | ||
| 131 | + this.nextCompDTO.compStyle === CompStyle.Zh_Single_Column_12 | ||
| 132 | + ) { | ||
| 133 | + Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6}) | ||
| 134 | + } else { | ||
| 135 | + Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 }) | ||
| 136 | + } | ||
| 137 | + } else { | ||
| 138 | + // Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | ||
| 139 | + } | ||
| 140 | + } | ||
| 141 | + | ||
| 142 | + @Builder | ||
| 87 | componentBuilder() { | 143 | componentBuilder() { |
| 144 | + this.beforeDevider(); | ||
| 88 | 145 | ||
| 89 | if (this.compDTO.operDataList[0]?.objectType !== '3' && | 146 | if (this.compDTO.operDataList[0]?.objectType !== '3' && |
| 90 | this.compDTO.operDataList[0]?.objectType !== '13') { //暂时屏蔽活动和音频详情入口 | 147 | this.compDTO.operDataList[0]?.objectType !== '13') { //暂时屏蔽活动和音频详情入口 |
| @@ -208,42 +265,7 @@ export struct CompParser { | @@ -208,42 +265,7 @@ export struct CompParser { | ||
| 208 | // }) | 265 | // }) |
| 209 | } | 266 | } |
| 210 | 267 | ||
| 211 | - if ( | ||
| 212 | - this.compDTO.compStyle === CompStyle.Card_09 || | ||
| 213 | - this.compDTO.compStyle === CompStyle.Zh_Single_Column_09 || | ||
| 214 | - this.compDTO.compStyle === CompStyle.Zh_Single_Row_04 || | ||
| 215 | - this.compDTO.compStyle === CompStyle.Zh_Single_Row_06 | ||
| 216 | - ) { | ||
| 217 | - if (this.compDTO.compStyle === this.nextCompDTO.compStyle) { | ||
| 218 | - Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 }) | ||
| 219 | - } else { | ||
| 220 | - Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6}) | ||
| 221 | - } | ||
| 222 | - } else if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) { | ||
| 223 | - Divider().strokeWidth(1).color('#f5f5f5').width('120%').margin({left: -6}) | ||
| 224 | - } else if (this.compDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) { | ||
| 225 | - // 大专题 | ||
| 226 | - if (this.nextCompDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) { | ||
| 227 | - Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 }) | ||
| 228 | - } else { | ||
| 229 | - Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6}) | ||
| 230 | - } | ||
| 231 | - } else if (this.compDTO.compType === 'appStyle' || this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 || this.compDTO.compStyle === CompStyle.Zh_Single_Row_03 || this.compDTO.compStyle === CompStyle.Card_Comp_Adv || this.compDTO.compStyle === CompStyle.Zh_Single_Column_02) { | ||
| 232 | - if ( | ||
| 233 | - this.nextCompDTO.compStyle === CompStyle.Card_09 || | ||
| 234 | - this.nextCompDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10 || | ||
| 235 | - this.nextCompDTO.compStyle === CompStyle.Zh_Single_Column_09 || | ||
| 236 | - this.nextCompDTO.compStyle === CompStyle.Zh_Single_Row_04 || | ||
| 237 | - this.nextCompDTO.compStyle === CompStyle.Zh_Single_Row_06 || | ||
| 238 | - this.nextCompDTO.compStyle === CompStyle.Zh_Single_Column_12 | ||
| 239 | - ) { | ||
| 240 | - Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6}) | ||
| 241 | - } else { | ||
| 242 | - Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 }) | ||
| 243 | - } | ||
| 244 | - } else { | ||
| 245 | - // Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | ||
| 246 | - } | 268 | + this.behindDevider() |
| 247 | } | 269 | } |
| 248 | 270 | ||
| 249 | 271 |
| @@ -60,17 +60,19 @@ export struct ZhSingleRow02 { | @@ -60,17 +60,19 @@ export struct ZhSingleRow02 { | ||
| 60 | 60 | ||
| 61 | toMore() { | 61 | toMore() { |
| 62 | if (this.moreWidth > this.initMoreWidth * 2) { | 62 | if (this.moreWidth > this.initMoreWidth * 2) { |
| 63 | - if (this.compDTO?.objectType === '11') { | ||
| 64 | - ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle) | ||
| 65 | - } else { | ||
| 66 | - const contentDTO: ContentDTO = { | ||
| 67 | - objectId: this.compDTO.objectId, | ||
| 68 | - objectType: this.compDTO.objectType, | ||
| 69 | - linkUrl: this.compDTO.linkUrl, | ||
| 70 | - pageId: this.compDTO.pageId | ||
| 71 | - } as ContentDTO | ||
| 72 | - ProcessUtils.processPage(contentDTO) | ||
| 73 | - } | 63 | + |
| 64 | + ProcessUtils.compJumpPage(this.compDTO) | ||
| 65 | + // if (this.compDTO?.objectType === '11') { | ||
| 66 | + // ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle) | ||
| 67 | + // } else { | ||
| 68 | + // const contentDTO: ContentDTO = { | ||
| 69 | + // objectId: this.compDTO.objectId, | ||
| 70 | + // objectType: this.compDTO.objectType, | ||
| 71 | + // linkUrl: this.compDTO.linkUrl, | ||
| 72 | + // pageId: this.compDTO.pageId | ||
| 73 | + // } as ContentDTO | ||
| 74 | + // ProcessUtils.processPage(contentDTO) | ||
| 75 | + // } | ||
| 74 | } | 76 | } |
| 75 | } | 77 | } |
| 76 | 78 |
| @@ -475,17 +475,19 @@ export struct ZhSingleRow03 { | @@ -475,17 +475,19 @@ export struct ZhSingleRow03 { | ||
| 475 | } | 475 | } |
| 476 | 476 | ||
| 477 | private jumpToMore() { | 477 | private jumpToMore() { |
| 478 | - if (this.compDTO.linkUrl) { | ||
| 479 | - let taskAction: Action = { | ||
| 480 | - type: 'JUMP_H5_BY_WEB_VIEW', | ||
| 481 | - params: { | ||
| 482 | - url: this.compDTO.linkUrl | ||
| 483 | - } as Params, | ||
| 484 | - }; | ||
| 485 | - WDRouterRule.jumpWithAction(taskAction) | ||
| 486 | - } else { | ||
| 487 | - this.jumpToLiveMorePage() | ||
| 488 | - } | 478 | + ProcessUtils.compJumpPage(this.compDTO) |
| 479 | + return; | ||
| 480 | + // if (this.compDTO.linkUrl) { | ||
| 481 | + // let taskAction: Action = { | ||
| 482 | + // type: 'JUMP_H5_BY_WEB_VIEW', | ||
| 483 | + // params: { | ||
| 484 | + // url: this.compDTO.linkUrl | ||
| 485 | + // } as Params, | ||
| 486 | + // }; | ||
| 487 | + // WDRouterRule.jumpWithAction(taskAction) | ||
| 488 | + // } else { | ||
| 489 | + // this.jumpToLiveMorePage() | ||
| 490 | + // } | ||
| 489 | } | 491 | } |
| 490 | 492 | ||
| 491 | } | 493 | } |
| @@ -65,11 +65,9 @@ export struct LiveHorizontalCardComponent { | @@ -65,11 +65,9 @@ export struct LiveHorizontalCardComponent { | ||
| 65 | } | 65 | } |
| 66 | 66 | ||
| 67 | liveToMore() { | 67 | liveToMore() { |
| 68 | + ProcessUtils.compJumpPage(this.compDTO) | ||
| 69 | + return; | ||
| 68 | if (!!this.compDTO.dataSourceType) { | 70 | if (!!this.compDTO.dataSourceType) { |
| 69 | - // if (this.compDTO.dataSourceType === 'OBJECT_POS') { | ||
| 70 | - // ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle) | ||
| 71 | - // return; | ||
| 72 | - // } | ||
| 73 | if (this.compDTO.linkUrl) { | 71 | if (this.compDTO.linkUrl) { |
| 74 | let taskAction: Action = { | 72 | let taskAction: Action = { |
| 75 | type: 'JUMP_INNER_NEW_PAGE', | 73 | type: 'JUMP_INNER_NEW_PAGE', |
| @@ -84,14 +82,8 @@ export struct LiveHorizontalCardComponent { | @@ -84,14 +82,8 @@ export struct LiveHorizontalCardComponent { | ||
| 84 | } | 82 | } |
| 85 | } as Params, | 83 | } as Params, |
| 86 | }; | 84 | }; |
| 87 | - // this.compDTO.operDataList = [] | ||
| 88 | - // console.log('LiveHorizontalCardComponent', JSON.stringify(this.compDTO)) | ||
| 89 | - // console.log('LiveHorizontalCardComponent', this.compDTO.relId) | ||
| 90 | - // console.log('LiveHorizontalCardComponent', this.compDTO.relType) | ||
| 91 | - // console.log('LiveHorizontalCardComponent', JSON.stringify(taskAction)) | ||
| 92 | WDRouterRule.jumpWithAction(taskAction) | 85 | WDRouterRule.jumpWithAction(taskAction) |
| 93 | } else { | 86 | } else { |
| 94 | - // console.log('LiveHorizontalCardComponent', 'jumpToLiveMorePage') | ||
| 95 | this.jumpToLiveMorePage() | 87 | this.jumpToLiveMorePage() |
| 96 | } | 88 | } |
| 97 | } else { | 89 | } else { |
| @@ -103,7 +95,6 @@ export struct LiveHorizontalCardComponent { | @@ -103,7 +95,6 @@ export struct LiveHorizontalCardComponent { | ||
| 103 | linkUrl: this.compDTO.linkUrl, | 95 | linkUrl: this.compDTO.linkUrl, |
| 104 | pageId: this.compDTO.pageId | 96 | pageId: this.compDTO.pageId |
| 105 | } as ContentDTO | 97 | } as ContentDTO |
| 106 | - // console.log('LiveHorizontalCardComponent', 'ProcessUtils.processPage') | ||
| 107 | ProcessUtils.processPage(contentDTO) | 98 | ProcessUtils.processPage(contentDTO) |
| 108 | } | 99 | } |
| 109 | } | 100 | } |
-
Please register or login to post a comment