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

!11710 【轻量级 PR】:update zh-cn/application-dev/reference/apis/js-apis-launcherBundleManager.md.

Merge pull request !11710 from longwei/N/A
......@@ -53,12 +53,12 @@ import launcherBundleManager from '@ohos.bundle.launcherBundleManager';
try {
launcherBundleManager.getLauncherAbilityInfo('com.example.demo', 100, (errData, data) => {
if (errData !== null) {
console.log(`errData is errCode:${errData.errCode} message:${errData.message}`);
console.log(`errData is errCode:${errData.code} message:${errData.message}`);
}
console.log("data is " + JSON.Stringify(data));
})
} catch (errData) {
console.log(`errData is errCode:${errData.errCode} message:${errData.message}`);
console.log(`errData is errCode:${errData.code} message:${errData.message}`);
}
```
......@@ -99,12 +99,12 @@ import launcherBundleManager from '@ohos.bundle.launcherBundleManager';
try {
launcherBundleManager.getLauncherAbilityInfo("com.example.demo", 100).then(data => {
console.log("data is " + JSON.Stringify(data));
console.log("data is " + JSON.stringify(data));
}).catch (errData => {
console.log(`errData is errCode:${errData.errCode} message:${errData.message}`);
console.log(`errData is errCode:${errData.code} message:${errData.message}`);
})
} catch (errData) {
console.log(`errData is errCode:${errData.errCode} message:${errData.message}`);
console.log(`errData is errCode:${errData.code} message:${errData.message}`);
}
```
......@@ -146,12 +146,12 @@ import launcherBundleManager from '@ohos.bundle.launcherBundleManager';
try {
launcherBundleManager.getAllLauncherAbilityInfo(100, (errData, data) => {
if (errData !== null) {
console.log(`errData is errCode:${errData.errCode} message:${errData.message}`);
console.log(`errData is errCode:${errData.code} message:${errData.message}`);
}
console.log("data is " + JSON.Stringify(data));
console.log("data is " + JSON.stringify(data));
})
} catch (errData) {
console.log(`errData is errCode:${errData.errCode} message:${errData.message}`);
console.log(`errData is errCode:${errData.code} message:${errData.message}`);
}
```
......@@ -184,12 +184,12 @@ import launcherBundleManager from '@ohos.bundle.launcherBundleManager';
try {
launcherBundleManager.getAllLauncherAbilityInfo(100).then(data => {
console.log("data is " + JSON.Stringify(data));
console.log("data is " + JSON.stringify(data));
}).catch (errData => {
console.log(`errData is errCode:${errData.errCode} message:${errData.message}`);
console.log(`errData is errCode:${errData.code} message:${errData.message}`);
})
} catch (errData) {
console.log(`errData is errCode:${errData.errCode} message:${errData.message}`);
console.log(`errData is errCode:${errData.code} message:${errData.message}`);
}
```
......@@ -223,12 +223,12 @@ import launcherBundleManager from '@ohos.bundle.launcherBundleManager';
try {
launcherBundleManager.getShortcutInfo("com.example.demo", (errData, data) => {
if (errData !== null) {
console.log(`errData is errCode:${errData.errCode} message:${errData.message}`);
console.log(`errData is errCode:${errData.code} message:${errData.message}`);
}
console.log("data is " + JSON.Stringify(data));
console.log("data is " + JSON.stringify(data));
})
} catch (errData) {
console.log(`errData is errCode:${errData.errCode} message:${errData.message}`);
console.log(`errData is errCode:${errData.code} message:${errData.message}`);
}
```
......@@ -257,11 +257,11 @@ import launcherBundleManager from '@ohos.bundle.launcherBundleManager';
try {
launcherBundleManager.getShortcutInfo("com.example.demo").then(data => {
console.log("data is " + JSON.Stringify(data));
console.log("data is " + JSON.stringify(data));
}).catch (errData => {
console.log(`errData is errCode:${errData.errCode} message:${errData.message}`);
console.log(`errData is errCode:${errData.code} message:${errData.message}`);
})
} catch (errData) {
console.log(`errData is errCode:${errData.errCode} message:${errData.message}`);
console.log(`errData is errCode:${errData.code} message:${errData.message}`);
}
```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册