ini myapp and review rest api

This commit is contained in:
2024-08-27 19:11:26 +08:00
parent 58ee459459
commit ff8c5714d9
7 changed files with 82 additions and 17 deletions

View File

@@ -2,8 +2,8 @@
import hilog from '@ohos.hilog';
let domain: number = 0xFF00;
let prefix: string = 'HM4Demo';
let format: string = `%{public}s`;
let prefix: string = 'HMDemo';
let format: string = `%{public}s, %{public}s`;
export class Log {

View File

@@ -25,11 +25,11 @@ export class ScreenUtil {
return ScreenUtil.instance;
}
initScreenSize(): void {
initScreenSize(context: Context): void {
this.portraitListener.on('change', (result)=> {
AppStorage.setOrCreate(ScreenUtil.isPortraitKey, result.matches)
})
window.getLastWindow(getContext(this))
window.getLastWindow(context)
.then((windowClass: window.Window) => {
let type = window.AvoidAreaType.TYPE_NAVIGATION_INDICATOR; // 以导航条避让为例
let avoidArea = windowClass.getWindowAvoidArea(type);