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

!13998 【挑单Monthly1018 元能力】disconnectAbility接口示例代码修正

Merge pull request !13998 from HuangXW/cherry-pick-1675049311
......@@ -586,11 +586,11 @@ var connectId = featureAbility.connectAbility(
onFailed: onFailedCallback,
},
);
var result = featureAbility.disconnectAbility(connectId,
(error) => {
console.log('featureAbilityTest DisConnectJsSameBundleName result errCode : ' + error.code)
},
);
featureAbility.disconnectAbility(connectId, (err) => {
console.log("featureAbilityTest disconnectAbility err====>"
+ ("json err=") + JSON.stringify(err));
});
```
## featureAbility.disconnectAbility<sup>7+</sup>
......
......@@ -432,7 +432,6 @@ particleAbility.disconnectAbility(connId).then((data) => {
}).catch((error) => {
console.log('particleAbilityTest result errCode : ' + error.code)
});
```
## particleAbility.disconnectAbility
......@@ -477,10 +476,10 @@ var connId = particleAbility.connectAbility(
onFailed: onFailedCallback,
},
);
var result = particleAbility.disconnectAbility(connId).then((data) => {
console.log(" data: " + data);
}).catch((error) => {
console.log('particleAbilityTest result errCode : ' + error.code)
particleAbility.disconnectAbility(connId, (err) => {
console.log("particleAbilityTest disconnectAbility err====>"
+ ("json err=") + JSON.stringify(err));
});
```
......@@ -545,12 +544,3 @@ particleAbility.disconnectAbility(connId).then((data) => {
| 名称 | 值 | 说明 |
| ----------------------------- | ---- | ------------------------------------------------------------ |
| INVALID_PARAMETER | -1 | 无效的参数。 |
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册