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

!2575 wantAgent文档修改

Merge pull request !2575 from zero-cyc/0326_1
# Ability开发 # Ability开发
- [Ability框架概述](ability-brief.md) - [Ability框架概述](ability-brief.md)
- FA模型 - FA模型
- [FA模型综述](fa-brief.md) - [FA模型综述](fa-brief.md)
- [PageAbility开发指导](fa-pageability.md) - [PageAbility开发指导](fa-pageability.md)
...@@ -15,5 +14,6 @@ ...@@ -15,5 +14,6 @@
- [Call调用开发指导](stage-call.md) - [Call调用开发指导](stage-call.md)
- [Stage卡片开发指导](stage-formextension.md) - [Stage卡片开发指导](stage-formextension.md)
- 其他 - 其他
- [WantAgent开发指导](wantagent.md)
- [Ability助手使用指导](ability-assistant-guidelines.md) - [Ability助手使用指导](ability-assistant-guidelines.md)
- [测试框架使用指导](ability-delegator.md) - [测试框架使用指导](ability-delegator.md)
...@@ -39,7 +39,7 @@ var wantAgentInfo = { ...@@ -39,7 +39,7 @@ var wantAgentInfo = {
parameters: {} parameters: {}
} }
], ],
operationType: OperationType.START_ABILITIE, operationType: OperationType.START_ABILITY,
requestCode: 0, requestCode: 0,
wantAgentFlags:[WantAgentFlags.CONSTANT_FLAG] wantAgentFlags:[WantAgentFlags.CONSTANT_FLAG]
} }
...@@ -66,11 +66,7 @@ wantAgent.getWantAgent(wantAgentInfo, (err, wantAgentObj) => { ...@@ -66,11 +66,7 @@ wantAgent.getWantAgent(wantAgentInfo, (err, wantAgentObj) => {
var triggerInfo = { var triggerInfo = {
code:0 code:0
} }
wantAgent.trigger(wantAgentObj, triggerInfo, (err, completeData) => { wantAgent.trigger(wantAgentObj, triggerInfo, (completeData) => {
if (err.code) {
console.error("[WantAgent]trigger err=" + JSON.stringify(err))
} else {
console.log("[WantAgent]getWantAgent success, completeData: ", + JSON.stringify(completeData)) console.log("[WantAgent]getWantAgent success, completeData: ", + JSON.stringify(completeData))
}
}) })
``` ```
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册