From a77055eebb68608f7cb0f1b773b45c67b3638e56 Mon Sep 17 00:00:00 2001 From: liangZ15 Date: Mon, 4 Jul 2022 14:34:17 +0800 Subject: [PATCH] Signed-off-by: liangZ15 --- .../reference/apis/js-apis-update.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-update.md b/zh-cn/application-dev/reference/apis/js-apis-update.md index dd4d37a23b..d14adb746c 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-update.md +++ b/zh-cn/application-dev/reference/apis/js-apis-update.md @@ -127,7 +127,7 @@ checkNewVersion(callback: AsyncCallback\): void ``` updater.checkNewVersion((err, result) => { - console.log(`checkNewVersion isExsitNewVersion ` + result?.isExsitNewVersion); + console.log(`checkNewVersion isExistNewVersion ` + result.isExistNewVersion); }); ``` @@ -149,9 +149,9 @@ checkNewVersion(): Promise\ ``` updater.checkNewVersion().then(result => { - console.log(`checkNewVersion isExsitNewVersion ` + result.isExsitNewVersion); + console.log(`checkNewVersion isExistNewVersion ` + result.isExistNewVersion); // 版本摘要信息 - console.log(`checkNewVersion versionDigestInfo ` + result.newVersionInfo.versionDigestInfo); + console.log(`checkNewVersion versionDigestInfo ` + result.newVersionInfo.versionDigestInfo.versionDigest); }).catch(err => { console.log(`checkNewVersion promise error ` + $JSON.stringify(err)); }); @@ -175,8 +175,8 @@ getNewVersionInfo(callback: AsyncCallback\): void ``` updater.getNewVersionInfo((err, info) => { - console.log(`info versionName = ` + info?.versionComponents[0].displayVersion); - console.log(`info versionCode = ` + info?.versionComponents[0].innerVersion); + console.log(`info displayVersion = ` + info?.versionComponents[0].displayVersion); + console.log(`info innerVersion = ` + info?.versionComponents[0].innerVersion); }); ``` @@ -198,8 +198,8 @@ getNewVersionInfo(): Promise\ ``` updater.getNewVersionInfo().then(info => { - console.log(`info versionName = ` + info.versionComponents[0].displayVersion); - console.log(`info versionCode = ` + info.versionComponents[0].innerVersion); + console.log(`info displayVersion = ` + info.versionComponents[0].displayVersion); + console.log(`info innerVersion = ` + info.versionComponents[0].innerVersion); }).catch(err => { console.log(`getNewVersionInfo promise error ` + $JSON.stringify(err)); }); @@ -772,10 +772,10 @@ let policy = { autoUpgradeStrategy: false, autoUpgradeInterval: [ 120, 240 ], // 自动升级时间段,用分钟表示 } -updater.setUpdatePolicy(policy).then(result => - console.log(`setUpdatePolicy ` + result) +updater.setUpgradePolicy(policy).then(result => + console.log(`setUpgradePolicy ` + result) ).catch(err => { - console.log(`setUpdatePolicy promise error ` + $JSON.stringify(err)); + console.log(`setUpgradePolicy promise error ` + $JSON.stringify(err)); }); ``` -- GitLab