wangliang_wd

feat:优化我的界面状态栏设置

... ... @@ -5,7 +5,7 @@ import MinePageDatasModel from '../../model/MinePageDatasModel'
import MinePageUserSimpleInfoUI from '../mine/MinePageUserSimpleInfoUI'
import MinePagePersonFunctionUI from '../mine/MinePagePersonFunctionUI'
import MinePageMoreFunctionUI from '../mine/MinePageMoreFunctionUI'
import { BreakpointSystem, DateTimeUtils, SPHelper, StringUtils } from 'wdKit'
import { BreakpointSystem, DateTimeUtils, SPHelper, StringUtils, WindowModel } from 'wdKit'
import { SpConstants } from 'wdConstant'
import dataPreferences from '@ohos.data.preferences';
import { MergeRecordDialog } from '../../dialog/MergeRecordDialog'
... ... @@ -92,7 +92,27 @@ export struct MinePageComponent {
this.pageShowTime = DateTimeUtils.getTimeStamp()
}
this.changeTopStatusBarColor(this.navItem.statusBarColor)
}
/**
* 修改手机顶部状态栏颜色
* @param statusValue
*/
changeTopStatusBarColor(statusValue: number) {
if (statusValue === 1) { // 黑色状态栏
WindowModel.shared.setWindowSystemBarProperties({
statusBarContentColor: '#000000',
})
} else { //白色状态栏
WindowModel.shared.setWindowSystemBarProperties({
statusBarContentColor: '#ffffff',
})
}
}
pageHideForUpdateData(){
if(this.isMinePage){
this.pageHideTime = DateTimeUtils.getTimeStamp()
... ... @@ -115,6 +135,8 @@ export struct MinePageComponent {
this.addLoginStatusObserver()
console.log(TAG,"currentBreakpoint==>"+this.currentBreakpoint)
this.currentChanged()
this.changeTopStatusBarColor(this.navItem.statusBarColor)
}
getMessageData(){
... ...