diff --git a/zh-cn/application-dev/quick-start/start-with-ets-stage.md b/zh-cn/application-dev/quick-start/start-with-ets-stage.md index 29f8e2fc1798eec51d7a47b4ee1f8776dd2c0942..04f63893d96bfd9ced996ed1f9d3f5c40b30142a 100644 --- a/zh-cn/application-dev/quick-start/start-with-ets-stage.md +++ b/zh-cn/application-dev/quick-start/start-with-ets-stage.md @@ -302,7 +302,13 @@ .height('5%') // 跳转按钮绑定onClick事件,点击时跳转到第二页 .onClick(() => { - router.pushUrl({ url: 'pages/Second' }) + console.info(`Succeeded in clicking the 'Next' button.`) + // 跳转到第二页 + router.pushUrl({ url: 'pages/Second' }).then(() => { + console.info('Succeeded in jumping to the second page.') + }).catch((err) => { + console.error(`Failed to jump to the second page.Code is ${err.code}, message is ${err.message}`) + }) }) } .width('100%') @@ -346,7 +352,14 @@ .height('5%') // 返回按钮绑定onClick事件,点击按钮时返回到第一页 .onClick(() => { - router.back() + console.info(`Succeeded in clicking the 'Back' button.`) + try { + // 返回第一页 + router.back() + console.info('Succeeded in returning to the first page.') + } catch (err) { + console.error(`Failed to return to the first page.Code is ${err.code}, message is ${err.message}`) + } }) } .width('100%')