From a705f3007ae7b547ca95873b40bcd3727ba60c2c Mon Sep 17 00:00:00 2001 From: zengyawen Date: Fri, 9 Sep 2022 09:46:51 +0000 Subject: [PATCH] fixed e62ed98 from https://gitee.com/zengyawen/docs/pulls/9345 update zh-cn/application-dev/reference/apis/js-apis-distributed-account.md. Signed-off-by: zengyawen --- .../apis/js-apis-distributed-account.md | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-distributed-account.md b/zh-cn/application-dev/reference/apis/js-apis-distributed-account.md index 626629182d..94c6667fae 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-distributed-account.md +++ b/zh-cn/application-dev/reference/apis/js-apis-distributed-account.md @@ -21,12 +21,13 @@ getDistributedAccountAbility(): DistributedAccountAbility **系统能力:** SystemCapability.Account.OsAccount -- 返回值: +**返回值:** + | 类型 | 说明 | | -------- | -------- | | [DistributedAccountAbility](#distributedaccountability) | 返回一个实例,实例提供查询和更新分布式帐号登录状态方法。 | -- 示例: +**示例:** ```js const accountAbility = account_distributedAccount.getDistributedAccountAbility(); ``` @@ -45,12 +46,13 @@ queryOsAccountDistributedInfo(callback: AsyncCallback<DistributedInfo>): v **需要权限:** ohos.permission.MANAGE_LOCAL_ACCOUNTS 或 ohos.permission.DISTRIBUTED_DATASYNC。 -- 参数: +**参数:** + | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | callback | AsyncCallback<[DistributedInfo](#distributedinfo)> | 是 | 获取分布式帐号信息的回调。 | -- 示例: +**示例:** ```js const accountAbility = account_distributedAccount.getDistributedAccountAbility(); accountAbility.queryOsAccountDistributedInfo((err, data) => { @@ -70,12 +72,13 @@ queryOsAccountDistributedInfo(): Promise<DistributedInfo> **需要权限:** ohos.permission.MANAGE_LOCAL_ACCOUNTS 或 ohos.permission.DISTRIBUTED_DATASYNC。 -- 返回值: +**返回值:** + | 类型 | 说明 | | -------- | -------- | | Promise<[DistributedInfo](#distributedinfo)> | Promise实例,用于获取异步返回结果。 | -- 示例: +**示例:** ```js const accountAbility = account_distributedAccount.getDistributedAccountAbility(); accountAbility.queryOsAccountDistributedInfo().then((data) => { @@ -96,13 +99,14 @@ updateOsAccountDistributedInfo(accountInfo: DistributedInfo, callback: AsyncCall **需要权限:** ohos.permission.MANAGE_LOCAL_ACCOUNTS。 -- 参数: +**参数:** + | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | accountInfo | [DistributedInfo](#distributedinfo) | 是 | 分布式帐号信息。 | | callback | AsyncCallback<void> | 是 | 更新分布式帐号信息的回调。 | -- 示例: +**示例:** ```js const accountAbility = account_distributedAccount.getDistributedAccountAbility(); let accountInfo = {id: '12345', name: 'ZhangSan', event: 'Ohos.account.event.LOGIN'}; @@ -121,17 +125,19 @@ updateOsAccountDistributedInfo(accountInfo: DistributedInfo): Promise<void> **需要权限:** ohos.permission.MANAGE_LOCAL_ACCOUNTS。 -- 参数: +**参数:** + | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | accountInfo | [DistributedInfo](#distributedinfo) | 是 | 分布式帐户信息。 | -- 返回值: +**返回值:** + | 类型 | 说明 | | -------- | -------- | | Promise<void> | Promise实例,用于获取异步返回结果。 | -- 示例: +**示例:** ```js const accountAbility = account_distributedAccount.getDistributedAccountAbility(); let accountInfo = {id: '12345', name: 'ZhangSan', event: 'Ohos.account.event.LOGIN'}; -- GitLab