diff --git a/zh-cn/application-dev/ability/Readme-CN.md b/zh-cn/application-dev/ability/Readme-CN.md index a0ab27dd5942f6af7aa81bdc998c812c18b77df3..1cc9425d38e5c9ae19989a031a07617805e4fd5f 100644 --- a/zh-cn/application-dev/ability/Readme-CN.md +++ b/zh-cn/application-dev/ability/Readme-CN.md @@ -1,6 +1,5 @@ # Ability开发 - [Ability框架概述](ability-brief.md) - - FA模型 - [FA模型综述](fa-brief.md) - [PageAbility开发指导](fa-pageability.md) @@ -15,5 +14,6 @@ - [Call调用开发指导](stage-call.md) - [Stage卡片开发指导](stage-formextension.md) - 其他 + - [WantAgent开发指导](wantagent.md) - [Ability助手使用指导](ability-assistant-guidelines.md) - - [测试框架使用指导](ability-delegator.md) \ No newline at end of file + - [测试框架使用指导](ability-delegator.md) diff --git a/zh-cn/application-dev/ability/wantagent.md b/zh-cn/application-dev/ability/wantagent.md index df8e79d046b123cc19a5ee910d3da72e05023611..260fa41f19dcc9e0c7c4fe5cd3b9593b835bdecc 100644 --- a/zh-cn/application-dev/ability/wantagent.md +++ b/zh-cn/application-dev/ability/wantagent.md @@ -39,7 +39,7 @@ var wantAgentInfo = { parameters: {} } ], - operationType: OperationType.START_ABILITIE, + operationType: OperationType.START_ABILITY, requestCode: 0, wantAgentFlags:[WantAgentFlags.CONSTANT_FLAG] } @@ -66,11 +66,7 @@ wantAgent.getWantAgent(wantAgentInfo, (err, wantAgentObj) => { var triggerInfo = { code:0 } -wantAgent.trigger(wantAgentObj, triggerInfo, (err, completeData) => { - if (err.code) { - console.error("[WantAgent]trigger err=" + JSON.stringify(err)) - } else { - console.log("[WantAgent]getWantAgent success, completeData: ", + JSON.stringify(completeData)) - } +wantAgent.trigger(wantAgentObj, triggerInfo, (completeData) => { + console.log("[WantAgent]getWantAgent success, completeData: ", + JSON.stringify(completeData)) }) ``` \ No newline at end of file