Showing
1 changed file
with
10 additions
and
0 deletions
| @@ -460,9 +460,19 @@ export struct TopNavigationComponent { | @@ -460,9 +460,19 @@ export struct TopNavigationComponent { | ||
| 460 | } | 460 | } |
| 461 | 461 | ||
| 462 | /** | 462 | /** |
| 463 | + * 判断是否当前页面处理逻辑,如消息通知,只需要切换到当前底导的处理,过滤掉非当前。 | ||
| 464 | + */ | ||
| 465 | + private isCurrentPage(): boolean { | ||
| 466 | + return this._currentNavIndex === this.navIndex | ||
| 467 | + } | ||
| 468 | + | ||
| 469 | + /** | ||
| 463 | * 频道id变化,即指定频道跳转场景 | 470 | * 频道id变化,即指定频道跳转场景 |
| 464 | */ | 471 | */ |
| 465 | onAssignChannelChange() { | 472 | onAssignChannelChange() { |
| 473 | + if (!this.isCurrentPage()) { | ||
| 474 | + return | ||
| 475 | + } | ||
| 466 | let channelId = this.assignChannel.channelId | 476 | let channelId = this.assignChannel.channelId |
| 467 | let index = -1 | 477 | let index = -1 |
| 468 | if (this._currentNavIndex === 0) { | 478 | if (this._currentNavIndex === 0) { |
-
Please register or login to post a comment