Showing
3 changed files
with
57 additions
and
22 deletions
| @@ -204,14 +204,14 @@ export struct SpacialTopicPageComponent { | @@ -204,14 +204,14 @@ export struct SpacialTopicPageComponent { | ||
| 204 | this.showCommentList = true | 204 | this.showCommentList = true |
| 205 | } | 205 | } |
| 206 | }) | 206 | }) |
| 207 | - //全部评论 | ||
| 208 | - CommentDialogView({ | ||
| 209 | - index: $index, | ||
| 210 | - currentIndex: $currentIndex, | ||
| 211 | - showCommentList: $showCommentList, | ||
| 212 | - publishCommentModel: $publishCommentModel, | ||
| 213 | - interactData: $interactData, | ||
| 214 | - }) | 207 | + // //全部评论 |
| 208 | + // CommentDialogView({ | ||
| 209 | + // index: $index, | ||
| 210 | + // currentIndex: $currentIndex, | ||
| 211 | + // showCommentList: $showCommentList, | ||
| 212 | + // publishCommentModel: $publishCommentModel, | ||
| 213 | + // interactData: $interactData, | ||
| 214 | + // }) | ||
| 215 | } | 215 | } |
| 216 | }.width(CommonConstants.FULL_WIDTH).height(CommonConstants.FULL_HEIGHT) | 216 | }.width(CommonConstants.FULL_WIDTH).height(CommonConstants.FULL_HEIGHT) |
| 217 | } | 217 | } |
| @@ -87,7 +87,41 @@ struct ChannelSubscriptionLayout { | @@ -87,7 +87,41 @@ struct ChannelSubscriptionLayout { | ||
| 87 | if (index > -1) { | 87 | if (index > -1) { |
| 88 | this.currentTopNavSelectedIndex = index | 88 | this.currentTopNavSelectedIndex = index |
| 89 | } | 89 | } |
| 90 | + }else { | ||
| 91 | + //检测删除频道后的当前频道是否是特殊频道 | ||
| 92 | + let item = this.myChannelList[this.currentTopNavSelectedIndex] | ||
| 93 | + if(this.isBroadcast(item) || this.isLayout(item)){ | ||
| 94 | + | ||
| 95 | + this.changeTab(this.currentTopNavSelectedIndex) | ||
| 96 | + this.isShow = false | ||
| 97 | + | ||
| 98 | + let index = this.myChannelList.findIndex(_item => _item?.channelId === this.indexSettingChannelId) | ||
| 99 | + console.debug('TopNavigationComponent','index='+index) | ||
| 100 | + if (index > -1) { | ||
| 101 | + this.currentTopNavSelectedIndex = index | ||
| 102 | + this.changeTab(this.currentTopNavSelectedIndex) | ||
| 103 | + } | ||
| 90 | } | 104 | } |
| 105 | + | ||
| 106 | + } | ||
| 107 | + } | ||
| 108 | + | ||
| 109 | + /** | ||
| 110 | + * 频道是播报 | ||
| 111 | + * @param item | ||
| 112 | + * @returns | ||
| 113 | + */ | ||
| 114 | + private isBroadcast(item?: TopNavDTO): boolean { | ||
| 115 | + return item?.channelId === 2066 | ||
| 116 | + } | ||
| 117 | + | ||
| 118 | + /** | ||
| 119 | + * 频道是电子报 | ||
| 120 | + * @param item | ||
| 121 | + * @returns | ||
| 122 | + */ | ||
| 123 | + private isLayout(item?: TopNavDTO): boolean { | ||
| 124 | + return item?.channelId === 2006 | ||
| 91 | } | 125 | } |
| 92 | 126 | ||
| 93 | // 添加频道 | 127 | // 添加频道 |
| @@ -114,17 +114,8 @@ export struct TopNavigationComponentNew { | @@ -114,17 +114,8 @@ export struct TopNavigationComponentNew { | ||
| 114 | return | 114 | return |
| 115 | } | 115 | } |
| 116 | 116 | ||
| 117 | - if (this.isBroadcastByIndex(index)) { | ||
| 118 | - // 跳转到播报页面 | ||
| 119 | - ProcessUtils.gotoBroadcastPage(this.myChannelList[index].pageId) | ||
| 120 | - | ||
| 121 | - } else if (this.isLayoutByIndex(index)) { | ||
| 122 | - // 跳转到电子报页面 | ||
| 123 | - ProcessUtils.gotoENewsPaper() | 117 | + this.channelJumpToPage(index) |
| 124 | 118 | ||
| 125 | - } else { | ||
| 126 | - this.changePage(index) | ||
| 127 | - } | ||
| 128 | }) | 119 | }) |
| 129 | .onAnimationEnd((index: number) => { | 120 | .onAnimationEnd((index: number) => { |
| 130 | Logger.info(TAG, `onAnimationEnd ${index}`); | 121 | Logger.info(TAG, `onAnimationEnd ${index}`); |
| @@ -151,7 +142,6 @@ export struct TopNavigationComponentNew { | @@ -151,7 +142,6 @@ export struct TopNavigationComponentNew { | ||
| 151 | this.changePage(this.currentTopNavSelectedIndex) | 142 | this.changePage(this.currentTopNavSelectedIndex) |
| 152 | } | 143 | } |
| 153 | } else { | 144 | } else { |
| 154 | - //this.currentTopNavSelectedIndex = index | ||
| 155 | } | 145 | } |
| 156 | 146 | ||
| 157 | }) | 147 | }) |
| @@ -226,7 +216,7 @@ export struct TopNavigationComponentNew { | @@ -226,7 +216,7 @@ export struct TopNavigationComponentNew { | ||
| 226 | moreChannelList: $moreChannelList, | 216 | moreChannelList: $moreChannelList, |
| 227 | localChannelList: $localChannelList, | 217 | localChannelList: $localChannelList, |
| 228 | changeTab: (index) => { | 218 | changeTab: (index) => { |
| 229 | - this.changePage(index) | 219 | + this.channelJumpToPage(index) |
| 230 | } | 220 | } |
| 231 | }) | 221 | }) |
| 232 | .id('channelManageBtn') | 222 | .id('channelManageBtn') |
| @@ -351,16 +341,27 @@ export struct TopNavigationComponentNew { | @@ -351,16 +341,27 @@ export struct TopNavigationComponentNew { | ||
| 351 | // 当前tab,单击事件 | 341 | // 当前tab,单击事件 |
| 352 | this.doAutoRefresh() | 342 | this.doAutoRefresh() |
| 353 | } else { | 343 | } else { |
| 344 | + this.channelJumpToPage(index) | ||
| 345 | + } | ||
| 346 | + }) | ||
| 347 | + } | ||
| 348 | + | ||
| 349 | + | ||
| 350 | + /** | ||
| 351 | + * 频道信息跳转页面方法 | ||
| 352 | + * @param index | ||
| 353 | + */ | ||
| 354 | + private channelJumpToPage(index :number){ | ||
| 354 | if (this.isBroadcastByIndex(index)) { | 355 | if (this.isBroadcastByIndex(index)) { |
| 355 | // 跳转到播报页面 | 356 | // 跳转到播报页面 |
| 356 | ProcessUtils.gotoBroadcastPage(this.myChannelList[index].pageId) | 357 | ProcessUtils.gotoBroadcastPage(this.myChannelList[index].pageId) |
| 357 | } else if (this.isLayoutByIndex(index)) { | 358 | } else if (this.isLayoutByIndex(index)) { |
| 359 | + // 跳转到电子报页面 | ||
| 358 | ProcessUtils.gotoENewsPaper() | 360 | ProcessUtils.gotoENewsPaper() |
| 359 | } else { | 361 | } else { |
| 360 | this.changePage(index) | 362 | this.changePage(index) |
| 361 | } | 363 | } |
| 362 | - } | ||
| 363 | - }) | 364 | + |
| 364 | } | 365 | } |
| 365 | 366 | ||
| 366 | /** | 367 | /** |
-
Please register or login to post a comment