Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
yuzhilin
2024-04-24 13:47:42 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f184ea81841c2d96dc929330a1ba607f349b4698
f184ea81
1 parent
e4f22214
默认选中热点频道
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
sight_harmony/features/wdComponent/src/main/ets/components/page/TopNavigationComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/TopNavigationComponent.ets
View file @
f184ea8
...
...
@@ -11,7 +11,7 @@ import { VideoChannelDetail } from 'wdDetailPlayShortVideo/Index';
const TAG = 'TopNavigationComponent';
PersistentStorage.persistProp('channelIds', '');
PersistentStorage.persistProp('indexSettingChannelId',
0
);
PersistentStorage.persistProp('indexSettingChannelId',
2002
);
const storage = LocalStorage.getShared();
...
...
@@ -36,7 +36,7 @@ export struct TopNavigationComponent {
// 顶导数据
@State @Watch('onTopNavigationDataUpdated') topNavList: TopNavDTO[] = []
@State compList: LazyDataSource<CompDTO> = new LazyDataSource();
@StorageProp('indexSettingChannelId') indexSettingChannelId: number =
0
@StorageProp('indexSettingChannelId') indexSettingChannelId: number =
2002
//我的频道id列表
@State channelIds: number[] = []
//本地缓存频道id列表
...
...
@@ -121,15 +121,11 @@ export struct TopNavigationComponent {
this.myChannelList = _myChannelList
//缓存首页频道
if (!this.indexSettingChannelId) {
AppStorage.set('indexSettingChannelId', this.homeChannelList[0].channelId)
} else {
let index = this.myChannelList.findIndex(_item => _item.channelId === this.indexSettingChannelId)
if (index > -1) {
this.currentTopNavSelectedIndex = index
}
}
}
isBroadcast(item: TopNavDTO) {
return item.name === '播报'
...
...
Please
register
or
login
to post a comment