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
liyubing
2024-06-13 17:54:51 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7866827c65a28cfb898d79787b5e9c511ae1b76d
7866827c
1 parent
a4c79e9e
feat:
1)处理首页新闻tab的顶导数据源;2)处理顶导存在电子报和播报 左右切换 回归问题
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
44 deletions
sight_harmony/features/wdComponent/src/main/ets/components/page/TopNavigationComponentNew.ets
sight_harmony/features/wdTracking/src/main/ets/tracking/Tracking.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/TopNavigationComponentNew.ets
View file @
7866827
...
...
@@ -116,62 +116,45 @@ export struct TopNavigationComponentNew {
if (curIndex === index) {
return
}
if (this.isBroadcastByIndex(index)) {
// 跳转到播报页面
ProcessUtils.gotoBroadcastPage(this.myChannelList[index].pageId)
let nextIndex = this.currentTopNavSelectedIndex > index ? index - 1 : index + 1
if (nextIndex < this.myChannelList.length) {
// 电子报和播报 相邻
if (this.isLayoutByIndex(nextIndex)) {
nextIndex = this.currentTopNavSelectedIndex > index ? nextIndex - 1 : nextIndex + 1
if (nextIndex < this.myChannelList.length) {
this.changePage(nextIndex)
} else {
this.changePage(curIndex)
}
} else {
this.changePage(nextIndex)
}
} else {
// 极左极右有特殊频道,用旧值
this.changePage(curIndex)
}
} else if (this.isLayoutByIndex(index)) {
// 跳转到电子报页面
ProcessUtils.gotoENewsPaper()
// 特殊频道遇到则跳转到下一个
let nextIndex = this.currentTopNavSelectedIndex > index ? index - 1 : index + 1
Logger.info(TAG, `电子报 :${nextIndex} ${this.myChannelList.length}`);
} else {
this.changePage(index)
}
})
.onAnimationEnd((index: number) => {
Logger.info(TAG, `onAnimationEnd ${index}`);
})
.onChange((index) => {
Logger.info(TAG, `onChange index : ${index}`);
if (this.isLayoutByIndex(index) || this.isBroadcastByIndex(index)) {
let nextIndex = this.currentTopNavSelectedIndex > index ? index - 1 : index + 1
if (nextIndex < this.myChannelList.length) {
// 电子报和播报 相邻
if (this.isBroadcastByIndex(nextIndex)) {
if (this.isBroadcastByIndex(nextIndex)
|| this.isLayoutByIndex(nextIndex)
) {
nextIndex = this.currentTopNavSelectedIndex > index ? nextIndex - 1 : nextIndex + 1
if (nextIndex < this.myChannelList.length) {
this.changePage(nextIndex)
} else {
this.changePage(
cur
Index)
this.changePage(
this.currentTopNavSelected
Index)
}
} else {
this.changePage(nextIndex)
}
} else {
// 极左极右有特殊频道,用旧值
this.changePage(
cur
Index)
this.changePage(
this.currentTopNavSelected
Index)
}
} else {
this.changePage(index)
}
})
.onAnimationEnd((index: number) => {
Logger.info(TAG, `onAnimationEnd ${index}`);
})
.onChange((index) => {
Logger.info(TAG, `onChange index : ${index}`);
})
}
.width('100%')
...
...
sight_harmony/features/wdTracking/src/main/ets/tracking/Tracking.ets
View file @
7866827
...
...
@@ -24,17 +24,17 @@ export class Tracking {
// Logger.error('yyyy','event track failed')
// })
let publicParams = new PublicParams()
publicParams.getPublicParams().then((pubParams) => {
if (params) {
for (const obj of Object.entries(params)) {
// Logger.info(TAG, ` ${obj[0]} => ` + `${obj[1]}`);
pubParams[obj[0]] = obj[1]
}
}
sensors.track(eventId, pubParams)
})
// let publicParams = new PublicParams()
// publicParams.getPublicParams().then((pubParams) => {
//
// if (params) {
// for (const obj of Object.entries(params)) {
// // Logger.info(TAG, ` ${obj[0]} => ` + `${obj[1]}`);
// pubParams[obj[0]] = obj[1]
// }
// }
// sensors.track(eventId, pubParams)
// })
}
}
...
...
Please
register
or
login
to post a comment