提交 9c23c885 编写于 作者: L libing23

修改appaccount格式

Signed-off-by: Nlibing <libing23@huawei.com>
上级 b885081c
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
## 导入模块 ## 导入模块
```js ```js
import account_distributedAccount from '@ohos.account.distributedAccount'; import account_distributedAccount from '@ohos.account.distributedAccount';
``` ```
...@@ -40,7 +40,7 @@ getDistributedAccountAbility(): DistributedAccountAbility ...@@ -40,7 +40,7 @@ getDistributedAccountAbility(): DistributedAccountAbility
getOsAccountDistributedInfo(callback: AsyncCallback&lt;DistributedInfo&gt;): void getOsAccountDistributedInfo(callback: AsyncCallback&lt;DistributedInfo&gt;): void
获取分布式帐号信息,使用callback回调异步返回结果 获取分布式帐号信息,使用callback异步回调
**系统能力:** SystemCapability.Account.OsAccount **系统能力:** SystemCapability.Account.OsAccount
...@@ -50,7 +50,15 @@ getOsAccountDistributedInfo(callback: AsyncCallback&lt;DistributedInfo&gt;): voi ...@@ -50,7 +50,15 @@ getOsAccountDistributedInfo(callback: AsyncCallback&lt;DistributedInfo&gt;): voi
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| callback | AsyncCallback&lt;[DistributedInfo](#distributedinfo)&gt; | 是 | 获取分布式帐号信息的回调。 | | callback | AsyncCallback&lt;[DistributedInfo](#distributedinfo)&gt; | 是 | 回调参数。当获取分布式帐号信息成功,err为undefined,data为获取到的分布式帐号信息对象;否则为错误对象。 |
**错误码:**
| 错误码ID | 错误信息|
| ------- | -------|
| 201 | permission denied. |
| 401 | the parameter check failed. |
| 12300001 | system service exception. |
**示例:** **示例:**
```js ```js
...@@ -70,7 +78,7 @@ getOsAccountDistributedInfo(callback: AsyncCallback&lt;DistributedInfo&gt;): voi ...@@ -70,7 +78,7 @@ getOsAccountDistributedInfo(callback: AsyncCallback&lt;DistributedInfo&gt;): voi
getOsAccountDistributedInfo(): Promise&lt;DistributedInfo&gt; getOsAccountDistributedInfo(): Promise&lt;DistributedInfo&gt;
获取分布式帐号信息,使用Promise方式异步返回结果 获取分布式帐号信息。使用Promise异步回调
**系统能力:** SystemCapability.Account.OsAccount **系统能力:** SystemCapability.Account.OsAccount
...@@ -80,7 +88,15 @@ getOsAccountDistributedInfo(): Promise&lt;DistributedInfo&gt; ...@@ -80,7 +88,15 @@ getOsAccountDistributedInfo(): Promise&lt;DistributedInfo&gt;
| 类型 | 说明 | | 类型 | 说明 |
| -------- | -------- | | -------- | -------- |
| Promise&lt;[DistributedInfo](#distributedinfo)&gt; | Promise实例,用于获取异步返回结果。 | | Promise&lt;[DistributedInfo](#distributedinfo)&gt; | Promise对象。返回分布式帐号信息对象。 |
**错误码:**
| 错误码ID | 错误信息|
| ------- | -------|
| 201 | permission denied. |
| 401 | the parameter check failed. |
| 12300001 | system service exception. |
**示例:** **示例:**
```js ```js
...@@ -100,7 +116,7 @@ getOsAccountDistributedInfo(): Promise&lt;DistributedInfo&gt; ...@@ -100,7 +116,7 @@ getOsAccountDistributedInfo(): Promise&lt;DistributedInfo&gt;
queryOsAccountDistributedInfo(callback: AsyncCallback&lt;DistributedInfo&gt;): void queryOsAccountDistributedInfo(callback: AsyncCallback&lt;DistributedInfo&gt;): void
获取分布式帐号信息,使用callback回调异步返回结果 获取分布式帐号信息。使用callback异步回调
> **说明:** 从API version 9开始废弃,建议使用[getOsAccountDistributedInfo](#getosaccountdistributedinfo9) > **说明:** 从API version 9开始废弃,建议使用[getOsAccountDistributedInfo](#getosaccountdistributedinfo9)
> >
> 从 API version 7开始支持。 > 从 API version 7开始支持。
...@@ -113,7 +129,7 @@ queryOsAccountDistributedInfo(callback: AsyncCallback&lt;DistributedInfo&gt;): v ...@@ -113,7 +129,7 @@ queryOsAccountDistributedInfo(callback: AsyncCallback&lt;DistributedInfo&gt;): v
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| callback | AsyncCallback&lt;[DistributedInfo](#distributedinfo)&gt; | 是 | 获取分布式帐号信息的回调。 | | callback | AsyncCallback&lt;[DistributedInfo](#distributedinfo)&gt; | 是 | 回调函数。当获取分布式帐号信息成功,err为undefined,data为获取到的分布式帐号信息对象;否则为错误对象。 |
**示例:** **示例:**
```js ```js
...@@ -129,7 +145,7 @@ queryOsAccountDistributedInfo(callback: AsyncCallback&lt;DistributedInfo&gt;): v ...@@ -129,7 +145,7 @@ queryOsAccountDistributedInfo(callback: AsyncCallback&lt;DistributedInfo&gt;): v
queryOsAccountDistributedInfo(): Promise&lt;DistributedInfo&gt; queryOsAccountDistributedInfo(): Promise&lt;DistributedInfo&gt;
获取分布式帐号信息,使用Promise方式异步返回结果 获取分布式帐号信息。使用Promise异步回调
> **说明:** 从API version 9开始废弃,建议使用[getOsAccountDistributedInfo](#getosaccountdistributedinfo9-1) > **说明:** 从API version 9开始废弃,建议使用[getOsAccountDistributedInfo](#getosaccountdistributedinfo9-1)
> >
> 从 API version 7开始支持。 > 从 API version 7开始支持。
...@@ -142,7 +158,7 @@ queryOsAccountDistributedInfo(): Promise&lt;DistributedInfo&gt; ...@@ -142,7 +158,7 @@ queryOsAccountDistributedInfo(): Promise&lt;DistributedInfo&gt;
| 类型 | 说明 | | 类型 | 说明 |
| -------- | -------- | | -------- | -------- |
| Promise&lt;[DistributedInfo](#distributedinfo)&gt; | Promise实例,用于获取异步返回结果。 | | Promise&lt;[DistributedInfo](#distributedinfo)&gt; | Promise对象。返回分布式帐号信息对象。 |
**示例:** **示例:**
```js ```js
...@@ -159,7 +175,7 @@ queryOsAccountDistributedInfo(): Promise&lt;DistributedInfo&gt; ...@@ -159,7 +175,7 @@ queryOsAccountDistributedInfo(): Promise&lt;DistributedInfo&gt;
setOsAccountDistributedInfo(accountInfo: DistributedInfo, callback: AsyncCallback&lt;void&gt;): void setOsAccountDistributedInfo(accountInfo: DistributedInfo, callback: AsyncCallback&lt;void&gt;): void
更新分布式帐号信息,使用callback回调异步返回结果 更新分布式帐号信息。使用callback异步回调
**系统能力:** SystemCapability.Account.OsAccount **系统能力:** SystemCapability.Account.OsAccount
...@@ -170,7 +186,16 @@ setOsAccountDistributedInfo(accountInfo: DistributedInfo, callback: AsyncCallbac ...@@ -170,7 +186,16 @@ setOsAccountDistributedInfo(accountInfo: DistributedInfo, callback: AsyncCallbac
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| accountInfo | [DistributedInfo](#distributedinfo) | 是 | 分布式帐号信息。 | | accountInfo | [DistributedInfo](#distributedinfo) | 是 | 分布式帐号信息。 |
| callback | AsyncCallback&lt;void&gt; | 是 | 更新分布式帐号信息的回调。 | | callback | AsyncCallback&lt;void&gt; | 是 | 回调函数。当更新分布式帐号信息成功时,err为undefined,否则为错误对象。 |
**错误码:**
| 错误码ID | 错误信息|
| ------- | -------|
| 201 | permission denied. |
| 401 | the parameter check failed. |
| 12300001 | system service exception. |
| 12300002 | invalid accountInfo. |
**示例:** **示例:**
```js ```js
...@@ -189,7 +214,7 @@ setOsAccountDistributedInfo(accountInfo: DistributedInfo, callback: AsyncCallbac ...@@ -189,7 +214,7 @@ setOsAccountDistributedInfo(accountInfo: DistributedInfo, callback: AsyncCallbac
setOsAccountDistributedInfo(accountInfo: DistributedInfo): Promise&lt;void&gt; setOsAccountDistributedInfo(accountInfo: DistributedInfo): Promise&lt;void&gt;
更新分布式帐号信息,使用Promise方式异步返回结果 更新分布式帐号信息。使用Promise异步回调
**系统能力:** SystemCapability.Account.OsAccount **系统能力:** SystemCapability.Account.OsAccount
...@@ -205,7 +230,16 @@ setOsAccountDistributedInfo(accountInfo: DistributedInfo): Promise&lt;void&gt; ...@@ -205,7 +230,16 @@ setOsAccountDistributedInfo(accountInfo: DistributedInfo): Promise&lt;void&gt;
| 类型 | 说明 | | 类型 | 说明 |
| -------- | -------- | | -------- | -------- |
| Promise&lt;void&gt; | Promise实例,用于获取异步返回结果。 | | Promise&lt;void&gt; | Promise对象。无返回结果的Promise对象。 |
**错误码:**
| 错误码ID | 错误信息|
| ------- | -------|
| 201 | permission denied. |
| 401 | the parameter check failed. |
| 12300001 | system service exception. |
| 12300002 | invalid accountInfo. |
**示例:** **示例:**
```js ```js
...@@ -225,7 +259,7 @@ setOsAccountDistributedInfo(accountInfo: DistributedInfo): Promise&lt;void&gt; ...@@ -225,7 +259,7 @@ setOsAccountDistributedInfo(accountInfo: DistributedInfo): Promise&lt;void&gt;
updateOsAccountDistributedInfo(accountInfo: DistributedInfo, callback: AsyncCallback&lt;void&gt;): void updateOsAccountDistributedInfo(accountInfo: DistributedInfo, callback: AsyncCallback&lt;void&gt;): void
更新分布式帐号信息,使用callback回调异步返回结果 更新分布式帐号信息。使用callback异步回调
> **说明:** 从API version 9开始废弃,建议使用[setOsAccountDistributedInfo](#setosaccountdistributedinfo9) > **说明:** 从API version 9开始废弃,建议使用[setOsAccountDistributedInfo](#setosaccountdistributedinfo9)
> >
> 从 API version 7开始支持。 > 从 API version 7开始支持。
...@@ -239,7 +273,7 @@ updateOsAccountDistributedInfo(accountInfo: DistributedInfo, callback: AsyncCall ...@@ -239,7 +273,7 @@ updateOsAccountDistributedInfo(accountInfo: DistributedInfo, callback: AsyncCall
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| accountInfo | [DistributedInfo](#distributedinfo) | 是 | 分布式帐号信息。 | | accountInfo | [DistributedInfo](#distributedinfo) | 是 | 分布式帐号信息。 |
| callback | AsyncCallback&lt;void&gt; | 是 | 更新分布式帐号信息的回调。 | | callback | AsyncCallback&lt;void&gt; | 是 | 回调函数。当更新分布式帐号信息成功时,err为undefined,否则为错误对象。 |
**示例:** **示例:**
```js ```js
...@@ -254,7 +288,7 @@ updateOsAccountDistributedInfo(accountInfo: DistributedInfo, callback: AsyncCall ...@@ -254,7 +288,7 @@ updateOsAccountDistributedInfo(accountInfo: DistributedInfo, callback: AsyncCall
updateOsAccountDistributedInfo(accountInfo: DistributedInfo): Promise&lt;void&gt; updateOsAccountDistributedInfo(accountInfo: DistributedInfo): Promise&lt;void&gt;
更新分布式帐号信息,使用Promise方式异步返回结果 更新分布式帐号信息。使用Promise异步回调
> **说明:** 从API version 9开始废弃,建议使用[setOsAccountDistributedInfo](#setosaccountdistributedinfo9-1) > **说明:** 从API version 9开始废弃,建议使用[setOsAccountDistributedInfo](#setosaccountdistributedinfo9-1)
> >
> 从 API version 7开始支持。 > 从 API version 7开始支持。
...@@ -272,7 +306,7 @@ updateOsAccountDistributedInfo(accountInfo: DistributedInfo): Promise&lt;void&gt ...@@ -272,7 +306,7 @@ updateOsAccountDistributedInfo(accountInfo: DistributedInfo): Promise&lt;void&gt
| 类型 | 说明 | | 类型 | 说明 |
| -------- | -------- | | -------- | -------- |
| Promise&lt;void&gt; | Promise实例,用于获取异步返回结果。 | | Promise&lt;void&gt; | Promise对象。无返回结果的Promise对象。 |
**示例:** **示例:**
```js ```js
......
...@@ -662,7 +662,7 @@ isVerified(callback: AsyncCallback&lt;boolean&gt;): void ...@@ -662,7 +662,7 @@ isVerified(callback: AsyncCallback&lt;boolean&gt;): void
### isVerified<sup>9+</sup> ### isVerified<sup>9+</sup>
isOsAccountVerified(localId: number, callback: AsyncCallback&lt;boolean&gt;): void isVerified(localId: number, callback: AsyncCallback&lt;boolean&gt;): void
检查指定系统帐号是否已验证,使用callback回调异步返回结果。 检查指定系统帐号是否已验证,使用callback回调异步返回结果。
...@@ -693,7 +693,7 @@ isOsAccountVerified(localId: number, callback: AsyncCallback&lt;boolean&gt;): vo ...@@ -693,7 +693,7 @@ isOsAccountVerified(localId: number, callback: AsyncCallback&lt;boolean&gt;): vo
### isVerified<sup>9+</sup> ### isVerified<sup>9+</sup>
isOsAccountVerified(localId?: number): Promise&lt;boolean&gt; isVerified(localId?: number): Promise&lt;boolean&gt;
检查指定系统帐号是否已验证,使用Promise方式异步返回结果。 检查指定系统帐号是否已验证,使用Promise方式异步返回结果。
...@@ -1423,7 +1423,7 @@ getOsAccountLocalIdFromUid(uid: number): Promise&lt;number&gt; ...@@ -1423,7 +1423,7 @@ getOsAccountLocalIdFromUid(uid: number): Promise&lt;number&gt;
### queryOsAccountLocalIdFromDomain<sup>9+</sup> ### queryOsAccountLocalIdFromDomain<sup>9+</sup>
getOsAccountLocalIdFromDomain(domainInfo: DomainAccountInfo, callback: AsyncCallback&lt;number&gt;): void queryOsAccountLocalIdFromDomain(domainInfo: DomainAccountInfo, callback: AsyncCallback&lt;number&gt;): void
根据域帐号信息,获取与其关联的系统帐号的帐号ID。 根据域帐号信息,获取与其关联的系统帐号的帐号ID。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册