提交 a77055ee 编写于 作者: L liangZ15

Signed-off-by: liangZ15 <lihongliang20@huawei.com>

上级 ef8742af
...@@ -127,7 +127,7 @@ checkNewVersion(callback: AsyncCallback\<CheckResult>): void ...@@ -127,7 +127,7 @@ checkNewVersion(callback: AsyncCallback\<CheckResult>): void
``` ```
updater.checkNewVersion((err, result) => { updater.checkNewVersion((err, result) => {
console.log(`checkNewVersion isExsitNewVersion ` + result?.isExsitNewVersion); console.log(`checkNewVersion isExistNewVersion ` + result.isExistNewVersion);
}); });
``` ```
...@@ -149,9 +149,9 @@ checkNewVersion(): Promise\<CheckResult> ...@@ -149,9 +149,9 @@ checkNewVersion(): Promise\<CheckResult>
``` ```
updater.checkNewVersion().then(result => { 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 => { }).catch(err => {
console.log(`checkNewVersion promise error ` + $JSON.stringify(err)); console.log(`checkNewVersion promise error ` + $JSON.stringify(err));
}); });
...@@ -175,8 +175,8 @@ getNewVersionInfo(callback: AsyncCallback\<NewVersionInfo>): void ...@@ -175,8 +175,8 @@ getNewVersionInfo(callback: AsyncCallback\<NewVersionInfo>): void
``` ```
updater.getNewVersionInfo((err, info) => { updater.getNewVersionInfo((err, info) => {
console.log(`info versionName = ` + info?.versionComponents[0].displayVersion); console.log(`info displayVersion = ` + info?.versionComponents[0].displayVersion);
console.log(`info versionCode = ` + info?.versionComponents[0].innerVersion); console.log(`info innerVersion = ` + info?.versionComponents[0].innerVersion);
}); });
``` ```
...@@ -198,8 +198,8 @@ getNewVersionInfo(): Promise\<NewVersionInfo> ...@@ -198,8 +198,8 @@ getNewVersionInfo(): Promise\<NewVersionInfo>
``` ```
updater.getNewVersionInfo().then(info => { updater.getNewVersionInfo().then(info => {
console.log(`info versionName = ` + info.versionComponents[0].displayVersion); console.log(`info displayVersion = ` + info.versionComponents[0].displayVersion);
console.log(`info versionCode = ` + info.versionComponents[0].innerVersion); console.log(`info innerVersion = ` + info.versionComponents[0].innerVersion);
}).catch(err => { }).catch(err => {
console.log(`getNewVersionInfo promise error ` + $JSON.stringify(err)); console.log(`getNewVersionInfo promise error ` + $JSON.stringify(err));
}); });
...@@ -772,10 +772,10 @@ let policy = { ...@@ -772,10 +772,10 @@ let policy = {
autoUpgradeStrategy: false, autoUpgradeStrategy: false,
autoUpgradeInterval: [ 120, 240 ], // 自动升级时间段,用分钟表示 autoUpgradeInterval: [ 120, 240 ], // 自动升级时间段,用分钟表示
} }
updater.setUpdatePolicy(policy).then(result => updater.setUpgradePolicy(policy).then(result =>
console.log(`setUpdatePolicy ` + result) console.log(`setUpgradePolicy ` + result)
).catch(err => { ).catch(err => {
console.log(`setUpdatePolicy promise error ` + $JSON.stringify(err)); console.log(`setUpgradePolicy promise error ` + $JSON.stringify(err));
}); });
``` ```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册