Showing
1 changed file
with
34 additions
and
0 deletions
| @@ -87,9 +87,43 @@ struct ChannelSubscriptionLayout { | @@ -87,9 +87,43 @@ 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 | + } | ||
| 104 | + } | ||
| 105 | + | ||
| 90 | } | 106 | } |
| 91 | } | 107 | } |
| 92 | 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 | ||
| 125 | + } | ||
| 126 | + | ||
| 93 | // 添加频道 | 127 | // 添加频道 |
| 94 | addChannelItem(item: TopNavDTO) { | 128 | addChannelItem(item: TopNavDTO) { |
| 95 | this.channelIds.push(item.channelId) | 129 | this.channelIds.push(item.channelId) |
-
Please register or login to post a comment