Showing
1 changed file
with
15 additions
and
14 deletions
| @@ -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