Showing
1 changed file
with
23 additions
and
1 deletions
| @@ -5,7 +5,7 @@ import MinePageDatasModel from '../../model/MinePageDatasModel' | @@ -5,7 +5,7 @@ import MinePageDatasModel from '../../model/MinePageDatasModel' | ||
| 5 | import MinePageUserSimpleInfoUI from '../mine/MinePageUserSimpleInfoUI' | 5 | import MinePageUserSimpleInfoUI from '../mine/MinePageUserSimpleInfoUI' |
| 6 | import MinePagePersonFunctionUI from '../mine/MinePagePersonFunctionUI' | 6 | import MinePagePersonFunctionUI from '../mine/MinePagePersonFunctionUI' |
| 7 | import MinePageMoreFunctionUI from '../mine/MinePageMoreFunctionUI' | 7 | import MinePageMoreFunctionUI from '../mine/MinePageMoreFunctionUI' |
| 8 | -import { BreakpointSystem, DateTimeUtils, SPHelper, StringUtils } from 'wdKit' | 8 | +import { BreakpointSystem, DateTimeUtils, SPHelper, StringUtils, WindowModel } from 'wdKit' |
| 9 | import { SpConstants } from 'wdConstant' | 9 | import { SpConstants } from 'wdConstant' |
| 10 | import dataPreferences from '@ohos.data.preferences'; | 10 | import dataPreferences from '@ohos.data.preferences'; |
| 11 | import { MergeRecordDialog } from '../../dialog/MergeRecordDialog' | 11 | import { MergeRecordDialog } from '../../dialog/MergeRecordDialog' |
| @@ -92,7 +92,27 @@ export struct MinePageComponent { | @@ -92,7 +92,27 @@ export struct MinePageComponent { | ||
| 92 | 92 | ||
| 93 | this.pageShowTime = DateTimeUtils.getTimeStamp() | 93 | this.pageShowTime = DateTimeUtils.getTimeStamp() |
| 94 | } | 94 | } |
| 95 | + | ||
| 96 | + this.changeTopStatusBarColor(this.navItem.statusBarColor) | ||
| 95 | } | 97 | } |
| 98 | + | ||
| 99 | + /** | ||
| 100 | + * 修改手机顶部状态栏颜色 | ||
| 101 | + * @param statusValue | ||
| 102 | + */ | ||
| 103 | + changeTopStatusBarColor(statusValue: number) { | ||
| 104 | + if (statusValue === 1) { // 黑色状态栏 | ||
| 105 | + WindowModel.shared.setWindowSystemBarProperties({ | ||
| 106 | + statusBarContentColor: '#000000', | ||
| 107 | + | ||
| 108 | + }) | ||
| 109 | + } else { //白色状态栏 | ||
| 110 | + WindowModel.shared.setWindowSystemBarProperties({ | ||
| 111 | + statusBarContentColor: '#ffffff', | ||
| 112 | + }) | ||
| 113 | + } | ||
| 114 | + } | ||
| 115 | + | ||
| 96 | pageHideForUpdateData(){ | 116 | pageHideForUpdateData(){ |
| 97 | if(this.isMinePage){ | 117 | if(this.isMinePage){ |
| 98 | this.pageHideTime = DateTimeUtils.getTimeStamp() | 118 | this.pageHideTime = DateTimeUtils.getTimeStamp() |
| @@ -115,6 +135,8 @@ export struct MinePageComponent { | @@ -115,6 +135,8 @@ export struct MinePageComponent { | ||
| 115 | this.addLoginStatusObserver() | 135 | this.addLoginStatusObserver() |
| 116 | console.log(TAG,"currentBreakpoint==>"+this.currentBreakpoint) | 136 | console.log(TAG,"currentBreakpoint==>"+this.currentBreakpoint) |
| 117 | this.currentChanged() | 137 | this.currentChanged() |
| 138 | + | ||
| 139 | + this.changeTopStatusBarColor(this.navItem.statusBarColor) | ||
| 118 | } | 140 | } |
| 119 | 141 | ||
| 120 | getMessageData(){ | 142 | getMessageData(){ |
-
Please register or login to post a comment