未验证 提交 63d342ab 编写于 作者: O openharmony_ci 提交者: Gitee

!5510 修复升级子系统api示例编译错误

Merge pull request !5510 from worldants/master
...@@ -134,11 +134,11 @@ getNewVersionInfo(callback: AsyncCallback\<NewVersionInfo>): void ...@@ -134,11 +134,11 @@ getNewVersionInfo(callback: AsyncCallback\<NewVersionInfo>): void
**示例:** **示例:**
``` ```
updater.getNewVersionInfo(info => { updater.getNewVersionInfo((err, info) => {
console.log("getNewVersionInfo success " + info.status); console.log("getNewVersionInfo success " + info.status);
console.log(`info versionName = ` + info.checkResult[0].versionName); console.log(`info versionName = ` + info.checkResults[0].versionName);
console.log(`info versionCode = ` + info.checkResult[0].versionCode); console.log(`info versionCode = ` + info.checkResults[0].versionCode);
console.log(`info verifyInfo = ` + info.checkResult[0].verifyInfo); console.log(`info verifyInfo = ` + info.checkResults[0].verifyInfo);
}); });
``` ```
...@@ -160,9 +160,9 @@ getNewVersionInfo(): Promise\<NewVersionInfo> ...@@ -160,9 +160,9 @@ getNewVersionInfo(): Promise\<NewVersionInfo>
``` ```
updater.getNewVersionInfo().then(value => { updater.getNewVersionInfo().then(value => {
console.log(`info versionName = ` + value.checkResult[0].versionName); console.log(`info versionName = ` + value.checkResults[0].versionName);
console.log(`info versionCode = ` + value.checkResult[0].versionCode); console.log(`info versionCode = ` + value.checkResults[0].versionCode);
console.log(`info verifyInfo = ` + value.checkResult[0].verifyInfo); console.log(`info verifyInfo = ` + value.checkResults[0].verifyInfo);
}).catch(err => { }).catch(err => {
console.log("getNewVersionInfo promise error: " + err.code); console.log("getNewVersionInfo promise error: " + err.code);
}); });
...@@ -185,11 +185,11 @@ checkNewVersion(callback: AsyncCallback\<NewVersionInfo>): void ...@@ -185,11 +185,11 @@ checkNewVersion(callback: AsyncCallback\<NewVersionInfo>): void
**示例:** **示例:**
``` ```
updater.checkNewVersion(info => { updater.checkNewVersion((err, info) => {
console.log("checkNewVersion success " + info.status); console.log("checkNewVersion success " + info.status);
console.log(`info versionName = ` + info.checkResult[0].versionName); console.log(`info versionName = ` + info.checkResults[0].versionName);
console.log(`info versionCode = ` + info.checkResult[0].versionCode); console.log(`info versionCode = ` + info.checkResults[0].versionCode);
console.log(`info verifyInfo = ` + info.checkResult[0].verifyInfo); console.log(`info verifyInfo = ` + info.checkResults[0].verifyInfo);
}); });
``` ```
...@@ -211,9 +211,9 @@ checkNewVersion(): Promise\<NewVersionInfo> ...@@ -211,9 +211,9 @@ checkNewVersion(): Promise\<NewVersionInfo>
``` ```
updater.checkNewVersion().then(value => { updater.checkNewVersion().then(value => {
console.log(`info versionName = ` + value.checkResult[0].versionName); console.log(`info versionName = ` + value.checkResults[0].versionName);
console.log(`info versionCode = ` + value.checkResult[0].versionCode); console.log(`info versionCode = ` + value.checkResults[0].versionCode);
console.log(`info verifyInfo = ` + value.checkResult[0].verifyInfo); console.log(`info verifyInfo = ` + value.checkResults[0].verifyInfo);
}).catch(err => { }).catch(err => {
console.log("checkNewVersion promise error: " + err.code); console.log("checkNewVersion promise error: " + err.code);
}); });
...@@ -284,7 +284,7 @@ rebootAndCleanUserData(callback: AsyncCallback\<number>): void ...@@ -284,7 +284,7 @@ rebootAndCleanUserData(callback: AsyncCallback\<number>): void
**示例:** **示例:**
``` ```
updater.rebootAndCleanUserData(result => { updater.rebootAndCleanUserData((err, result) => {
console.log("rebootAndCleanUserData ", result) console.log("rebootAndCleanUserData ", result)
}); });
``` ```
...@@ -330,7 +330,7 @@ applyNewVersion(callback: AsyncCallback\<number>): void ...@@ -330,7 +330,7 @@ applyNewVersion(callback: AsyncCallback\<number>): void
**示例:** **示例:**
``` ```
updater.applyNewVersion(result => { updater.applyNewVersion((err, result) => {
console.log("applyNewVersion ", result) console.log("applyNewVersion ", result)
}); });
``` ```
...@@ -399,7 +399,7 @@ let policy = { ...@@ -399,7 +399,7 @@ let policy = {
autoUpgradeInterval: [ 2, 3 ], autoUpgradeInterval: [ 2, 3 ],
autoUpgradeCondition: 2 autoUpgradeCondition: 2
} }
updater.setUpdatePolicy(policy, result => { updater.setUpdatePolicy(policy, (err, result) => {
console.log("setUpdatePolicy ", result) console.log("setUpdatePolicy ", result)
}); });
``` ```
...@@ -458,7 +458,7 @@ getUpdatePolicy(callback: AsyncCallback\<UpdatePolicy>): void ...@@ -458,7 +458,7 @@ getUpdatePolicy(callback: AsyncCallback\<UpdatePolicy>): void
**示例:** **示例:**
``` ```
updater.getUpdatePolicy(policy => { updater.getUpdatePolicy((err, policy) => {
console.log("getUpdatePolicy success"); console.log("getUpdatePolicy success");
console.log(`policy autoDownload = ` + policy.autoDownload); console.log(`policy autoDownload = ` + policy.autoDownload);
console.log(`policy autoDownloadNet = ` + policy.autoDownloadNet); console.log(`policy autoDownloadNet = ` + policy.autoDownloadNet);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册