提交 39ab4ba6 编写于 作者: L lichenchen

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

Signed-off-by: Nlichenchen <lichenchen15@huawei.com>
上级 d7825edb
......@@ -797,6 +797,35 @@ getAssociatedData(name: string, key: string): Promise&lt;string&gt;
});
```
### 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(callback: AsyncCallback&lt;Array&lt;AppAccountInfo&gt;&gt;): void
......
......@@ -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.
先完成此消息的编辑!
想要评论请 注册