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-27 19:40:45 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
11b120986e4d261f4b471912464677fa5904acea
11b12098
1 parent
30cb0a0b
feat:换肤
1)优化沉浸式频道检测
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
12 deletions
sight_harmony/features/wdComponent/src/main/ets/components/page/TopNavigationComponentNew.ets
sight_harmony/products/phone/src/main/ets/pages/view/BottomNavigationComponent.ets
sight_harmony/products/phone/src/main/ets/pages/view/VideoChannelPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/TopNavigationComponentNew.ets
View file @
11b1209
...
...
@@ -11,7 +11,6 @@ import { ParamType, TrackConstants, Tracking, TrackingButton } from 'wdTracking/
import DailyPaperTopicModel from '../../model/DailyPaperTopicModel';
import { CompUtils } from '../../utils/CompUtils';
import ChannelViewModel from '../../viewmodel/ChannelViewModel';
import { common2D, drawing } from '@kit.ArkGraphics2D';
import { ColorUtils } from '../../utils/ColorUtils';
const TAG = 'TopNavigationComponent';
...
...
sight_harmony/products/phone/src/main/ets/pages/view/BottomNavigationComponent.ets
View file @
11b1209
...
...
@@ -35,11 +35,9 @@ export struct BottomNavigationComponent {
@Provide currentBottomNavInfo: BottomNavDTO = {} as BottomNavDTO; // 当前底导信息
@Provide currentTopNavInfo: TopNavDTO = {} as TopNavDTO; // 当前顶导信息
@Provide barBackgroundColor: Color = Color.Transparent
// @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State @Watch('onBottomNavigationDataUpdated') bottomNavList: BottomNavDTO[] = [] // 底导/顶导全部数据
@State currentNavIndex: number = BottomNavi.NEWS; // 底导当前选中/焦点下标
// @State topNavList: TopNavDTO[] = []
// 底导TabsController
private navController: TabsController = new TabsController();
readonly ASPECT_RATIO_1_1: number = 1 / 1; // 底导图片宽高比
...
...
@@ -281,7 +279,6 @@ export struct BottomNavigationComponent {
onBottomNavigationDataUpdated() {
Logger.error('yyyy', 'onBottomNavigationDataUpdated ' + JSON.stringify(this.bottomNavList))
// Logger.info(TAG, `onBottomNavigationDataUpdated currentNavIndex: ${this.currentNavIndex},length:${this.bottomNavItemList.length}`);
}
/**
...
...
sight_harmony/products/phone/src/main/ets/pages/view/VideoChannelPage.ets
View file @
11b1209
...
...
@@ -54,9 +54,7 @@ export struct VideoChannelPage {
*/
setBarBackgroundColor() {
//Logger.debug('setBarBackgroundColor','setBarBackgroundColor '+this.navItem.name+' '+this.navItem.statusBarColor)
if (this.currentTopNavSelectedIndex === 0 && CompUtils.isVideo(this.currentBottomNavInfo)) {
if (this.isImmerseChannel() && CompUtils.isVideo(this.currentBottomNavInfo)) {
this.barBackgroundColor = Color.Black
this.isImmersive = true
this.changeTopStatusBarColor(0)// 沉浸页面顶部导航栏颜色固定黑色
...
...
@@ -180,9 +178,9 @@ export struct VideoChannelPage {
// 搜索按钮
Row() {
Image($r(this.
currentTopNavSelectedIndex === 0
? 'app.media.icon_search_gray_svg' :
Image($r(this.
isImmerseChannel()
? 'app.media.icon_search_gray_svg' :
'app.media.icon_search'))
.colorFilter(this.
currentTopNavSelectedIndex === 0
? undefined :
.colorFilter(this.
isImmerseChannel()
? undefined :
ColorUtils.getDrawingColorFilter(this.getBothColor("")))
.width('24vp')
.height('24vp')
...
...
@@ -212,6 +210,15 @@ export struct VideoChannelPage {
}
/**
* 检测是否是沉浸式频道
* @returns
*/
isImmerseChannel():boolean{
return this.navItem.topNavChannelList[this.currentTopNavSelectedIndex].channelStyle === 1;
}
/**
* 两侧文字图标颜色,搜索图标颜色
* @returns
*/
...
...
@@ -224,7 +231,7 @@ export struct VideoChannelPage {
pageSwiperView() {
Swiper(this.swiperController) {
ForEach(this.topNavList, (item: TopNavDTO, index: number) => {
if (i
ndex == 0
) {
if (i
tem.channelStyle===1
) {
// 视频
VideoChannelDetail({
bottomNavIndex: $_currentNavIndex,
...
...
@@ -246,8 +253,7 @@ export struct VideoChannelPage {
pageId: item.pageId + '',
channelId: item.channelId + '',
autoRefresh: this.autoRefresh
})// .padding({ top: px2vp(this.topSafeHeight) + 44 })
.backgroundColor(Color.White)
}).backgroundColor(Color.White)
}
}
...
...
Please
register
or
login
to post a comment