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

!19706 【OpenHarmony 4.0.8.1】【元能力】【ToD】【资料】【RK3568】【必现-3/3】【特性需求】原子化服务支持分享资料问题

Merge pull request !19706 from wangkailong/acquire
......@@ -2158,9 +2158,11 @@ import formHost from '@ohos.app.form.formHost';
let formId = '12400633174999288';
try {
formHost.acquireFormData(formId, (error) => {
formHost.acquireFormData(formId, (error, data) => {
if (error) {
console.error(`error, code: ${error.code}, message: ${error.message}`);
} else {
console.log('formHost acquireFormData, data: ${JSON.stringify(data)}');
}
});
} catch(error) {
......@@ -2188,7 +2190,7 @@ acquireFormData(formId: string): Promise<{[key: string]: Object}>;
| 类型 | 说明 |
| ------------------- | ------------------------- |
| Promise&lt;void&gt; | 无返回结果的Promise对象。 |
| Promise<{[key: string]: Object}>| 以Promise方式返回接口运行结果及分享数据。 |
**错误码:**
......@@ -2206,8 +2208,8 @@ import formHost from '@ohos.app.form.formHost';
let formId = '12400633174999288';
try {
formHost.acquireFormData(formId).then(() => {
console.log('formHost acquireFormData success');
formHost.acquireFormData(formId).then((data) => {
console.log('formHost acquireFormData success' + data);
}).catch((error) => {
console.error(`error, code: ${error.code}, message: ${error.message}`);
});
......
......@@ -354,7 +354,7 @@ getBundleName(agent: WantAgent): Promise\<string\>
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ----- | --------- | ---- | ------------- |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册