|
@@ -14,14 +14,16 @@ import { GlobalContext } from '@szyx/sdk_base';
|
|
|
export default class AppAbility extends UIAbility {
|
|
|
onWindowStageCreate(windowStage: window.WindowStage): void {
|
|
|
|
|
|
+ GlobalContext.setContext(this.context)
|
|
|
+
|
|
|
windowStage.loadContent('pages/Index', (err) => {
|
|
|
if (err.code) {
|
|
|
- hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
|
|
|
+ LogHelper.error(`Failed to load the content. Cause: ${JSON.stringify(err) ?? ''}`);
|
|
|
return;
|
|
|
}
|
|
|
+ hilog.info(0x0000, 'testTag', 'Succeeded in loading the content.');
|
|
|
+ WindowHelper.windowClass = windowStage.getMainWindowSync()
|
|
|
});
|
|
|
- // 这行代码
|
|
|
- GlobalContext.setContext(this.context)
|
|
|
}
|
|
|
}
|
|
|
```
|