diff --git a/zh-cn/application-dev/reference/apis/js-apis-featureAbility.md b/zh-cn/application-dev/reference/apis/js-apis-featureAbility.md index 498beac2cf35330b742c8aa6451086417062a6a7..4d56a62ee0e36423e989a3ed38e6e95e1d51cd5f 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-featureAbility.md +++ b/zh-cn/application-dev/reference/apis/js-apis-featureAbility.md @@ -34,7 +34,7 @@ startAbility(parameter: StartAbilityParameter, callback: AsyncCallback\) import featureAbility from '@ohos.ability.featureAbility' import wantConstant from '@ohos.ability.wantConstant' featureAbility.startAbility( - { + { want: { action: "", @@ -85,7 +85,7 @@ featureAbility.startAbility( uri: "" }, } - ).then((data) => { +).then((data) => { console.info("==========================>startAbility=======================>"); }); ``` @@ -153,6 +153,9 @@ featureAbility.startAbilityForResult( uri:"" }, }, + (err, data) => { + console.info("err: " + JSON.stringfy(err) + "data: " + JSON.stringfy(data)) + } ) ``` @@ -407,7 +410,7 @@ getWant(): Promise\ ```javascript import featureAbility from '@ohos.ability.featureability'; featureAbility.getWant().then((data) => { - console.info("==========================>getWantCallBack=======================>"); + console.info("==========================>getWantCallBack=======================>"); }); ``` @@ -476,7 +479,8 @@ terminateSelf(): Promise\ ```javascript import featureAbility from '@ohos.ability.featureability'; -featureAbility.terminateSelf().then((data) => { console.info("==========================>terminateSelfCallBack=======================>"); +featureAbility.terminateSelf().then((data) => { + console.info("==========================>terminateSelfCallBack=======================>"); }); ``` @@ -591,7 +595,7 @@ var connId = featureAbility.connectAbility( ); var result = featureAbility.disconnectAbility(connId, (error,data) => { - console.log('featureAbilityTest DisConnectJsSameBundleName result errCode : ' + error.code + " data: " + data) + console.log('featureAbilityTest DisConnectJsSameBundleName result errCode : ' + error.code + " data: " + data) }, ); ``` @@ -642,7 +646,7 @@ var connId = featureAbility.connectAbility( }, ); -featureAbility.disconnectAbility(connId).then((error,data)=>{ +featureAbility.disconnectAbility(connId).then((error,data) => { console.log('featureAbilityTest result errCode : ' + error.code + " data: " + data); }); ```