From 76b17027b5914a4d290b1d6b75cb131a438e63de Mon Sep 17 00:00:00 2001 From: wpp <58198665+879356503@users.noreply.github.com> Date: Thu, 27 Mar 2025 21:15:58 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=84=E8=8C=83=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/main/ets/entryability/EntryAbility.ets | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/entry/src/main/ets/entryability/EntryAbility.ets b/entry/src/main/ets/entryability/EntryAbility.ets index 93f77d1..d0db6a5 100644 --- a/entry/src/main/ets/entryability/EntryAbility.ets +++ b/entry/src/main/ets/entryability/EntryAbility.ets @@ -83,18 +83,17 @@ export default class EntryAbility extends UIAbility { let context = this.context; let resourceManager: resourceManager.ResourceManager = context.resourceManager; AppStorage.setOrCreate('resourceManager', resourceManager); - windowStage.loadContent('pages/Index', (err, data) => { + windowStage.loadContent('pages/Index', (err) => { if (err.code) { - hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); + hilog.error(0x0000, 'Failed to load the content. Cause: %{public}s', JSON.stringify(err.code) ?? ''); return; } - hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s', JSON.stringify(data) ?? ''); let windowClass: window.Window = windowStage.getMainWindowSync(); let isLayoutFullScreen = true; windowClass.setWindowLayoutFullScreen(isLayoutFullScreen).then(() => { - console.info('Succeeded in setting the window layout to full-screen mode.'); + hilog.info(0x0000, 'testTag', 'Succeeded in setting the window layout to full-screen mode.'); }).catch((err: BusinessError) => { - console.error('Failed to set the window layout to full-screen mode. Cause:' + JSON.stringify(err)); + hilog.error(0x0000, 'Failed to set the window layout to full-screen mode.', JSON.stringify(err.code)); }); }); } -- Gitee