未验证 提交 9ecab662 编写于 作者: O openharmony_ci 提交者: Gitee

!23660 账号docs示例代码语言标记更改

Merge pull request !23660 from cc_ggboy/master
......@@ -8,7 +8,7 @@
## 导入模块
```js
```ts
import account_distributedAccount from '@ohos.account.distributedAccount';
```
......@@ -27,7 +27,7 @@ getDistributedAccountAbility(): DistributedAccountAbility
| [DistributedAccountAbility](#distributedaccountability) | 返回一个实例,实例提供查询和更新分布式帐号登录状态方法。 |
**示例:**
```js
```ts
const accountAbility = account_distributedAccount.getDistributedAccountAbility();
```
......@@ -58,7 +58,7 @@ getOsAccountDistributedInfo(callback: AsyncCallback<DistributedInfo>): voi
| 12300001 | System service exception. |
**示例:**
```js
```ts
import { BusinessError } from '@ohos.base';
const accountAbility = account_distributedAccount.getDistributedAccountAbility();
......@@ -99,7 +99,7 @@ getOsAccountDistributedInfo(): Promise<DistributedInfo>
| 12300001 | System service exception. |
**示例:**
```js
```ts
import { BusinessError } from '@ohos.base';
const accountAbility = account_distributedAccount.getDistributedAccountAbility();
......@@ -141,7 +141,7 @@ getOsAccountDistributedInfoByLocalId(localId: number, callback: AsyncCallback&lt
| 12300003 | Account not found. |
**示例:**
```js
```ts
import { BusinessError } from '@ohos.base';
const accountAbility = account_distributedAccount.getDistributedAccountAbility();
......@@ -185,7 +185,7 @@ getOsAccountDistributedInfoByLocalId(localId: number): Promise<DistributedInf
| 12300003 | Account not found. |
**示例:**
```js
```ts
import { BusinessError } from '@ohos.base';
const accountAbility = account_distributedAccount.getDistributedAccountAbility();
......@@ -221,7 +221,7 @@ queryOsAccountDistributedInfo(callback: AsyncCallback<DistributedInfo>): v
| callback | AsyncCallback<[DistributedInfo](#distributedinfo)> | 是 | 回调函数。当获取分布式帐号信息成功,err为undefined,data为获取到的分布式帐号信息对象;否则为错误对象。 |
**示例:**
```js
```ts
import { BusinessError } from '@ohos.base';
const accountAbility = account_distributedAccount.getDistributedAccountAbility();
......@@ -256,7 +256,7 @@ queryOsAccountDistributedInfo(): Promise<DistributedInfo>
| Promise<[DistributedInfo](#distributedinfo)> | Promise对象,返回分布式帐号信息对象。 |
**示例:**
```js
```ts
import { BusinessError } from '@ohos.base';
const accountAbility = account_distributedAccount.getDistributedAccountAbility();
......@@ -293,7 +293,7 @@ setOsAccountDistributedInfo(accountInfo: DistributedInfo, callback: AsyncCallbac
| 12300003 | Account not found. |
**示例:**
```js
```ts
import { BusinessError } from '@ohos.base';
const accountAbility = account_distributedAccount.getDistributedAccountAbility();
......@@ -343,7 +343,7 @@ setOsAccountDistributedInfo(accountInfo: DistributedInfo): Promise<void>
| 12300003 | Account not found. |
**示例:**
```js
```ts
import { BusinessError } from '@ohos.base';
const accountAbility = account_distributedAccount.getDistributedAccountAbility();
......@@ -389,7 +389,7 @@ setOsAccountDistributedInfoByLocalId(localId: number, distributedInfo: Distribut
| 12300008 | Restricted OS account. |
**示例:**
```js
```ts
import { BusinessError } from '@ohos.base';
const accountAbility = account_distributedAccount.getDistributedAccountAbility();
......@@ -443,7 +443,7 @@ setOsAccountDistributedInfoByLocalId(localId: number, distributedInfo: Distribut
| 12300008 | Restricted OS account. |
**示例:**
```js
```ts
import { BusinessError } from '@ohos.base';
const accountAbility = account_distributedAccount.getDistributedAccountAbility();
......@@ -482,7 +482,7 @@ updateOsAccountDistributedInfo(accountInfo: DistributedInfo, callback: AsyncCall
| callback | AsyncCallback<void> | 是 | 回调函数。当更新分布式帐号信息成功时,err为undefined,否则为错误对象。 |
**示例:**
```js
```ts
import { BusinessError } from '@ohos.base';
const accountAbility = account_distributedAccount.getDistributedAccountAbility();
......@@ -522,7 +522,7 @@ updateOsAccountDistributedInfo(accountInfo: DistributedInfo): Promise<void&gt
| Promise<void> | Promise对象,无返回结果的Promise对象。 |
**示例:**
```js
```ts
import { BusinessError } from '@ohos.base';
const accountAbility = account_distributedAccount.getDistributedAccountAbility();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册