未验证 提交 1d58a813 编写于 作者: O openharmony_ci 提交者: Gitee

!8545 docs仓账号子系统接口说明整改

Merge pull request !8545 from lichenchen/master
...@@ -797,6 +797,35 @@ getAssociatedData(name: string, key: string): Promise<string> ...@@ -797,6 +797,35 @@ getAssociatedData(name: string, key: string): Promise<string>
}); });
``` ```
### getAssociatedDataSync
getAssociatedDataSync(name: string, key: string): string;
获取与此应用程序帐号关联的数据,使用同步方式返回结果。
**系统能力:** SystemCapability.Account.AppAccount
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ---- | ------ | ---- | --------- |
| name | string | 是 | 应用帐号名称。 |
| key | string | 是 | 要获取的数据的键。 |
**返回值:**
| 类型 | 说明 |
| :-------------------- | :-------------------- |
| string | 用于获取同步接口的返回结果。 |
**示例:**
```js
const appAccountManager = account_appAccount.createAppAccountManager();
var backData = appAccountManager.getAssociatedDataSync("ZhangSan", "k001");
console.info("getAssociatedDataSync backData:" + JSON.stringify(backData));
```
### getAllAccessibleAccounts ### getAllAccessibleAccounts
getAllAccessibleAccounts(callback: AsyncCallback<Array<AppAccountInfo>>): void getAllAccessibleAccounts(callback: AsyncCallback<Array<AppAccountInfo>>): void
......
...@@ -19,6 +19,8 @@ getDistributedAccountAbility(): DistributedAccountAbility ...@@ -19,6 +19,8 @@ getDistributedAccountAbility(): DistributedAccountAbility
获取分布式帐号单实例对象。 获取分布式帐号单实例对象。
**系统能力:** SystemCapability.Account.OsAccount
- 返回值: - 返回值:
| 类型 | 说明 | | 类型 | 说明 |
| -------- | -------- | | -------- | -------- |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册