Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
91c17343
D
Docs
项目概览
OpenHarmony
/
Docs
1 年多 前同步成功
通知
159
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
91c17343
编写于
3月 13, 2023
作者:
O
openharmony_ci
提交者:
Gitee
3月 13, 2023
浏览文件
操作
浏览文件
下载
差异文件
!15893 账号接口一致性整改
Merge pull request !15893 from zhouyan/docs
上级
67f73015
1814c76b
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
51 addition
and
55 deletion
+51
-55
zh-cn/application-dev/reference/apis/js-apis-osAccount.md
zh-cn/application-dev/reference/apis/js-apis-osAccount.md
+51
-55
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-osAccount.md
浏览文件 @
91c17343
...
...
@@ -326,9 +326,9 @@ checkOsAccountConstraintEnabled(localId: number, constraint: string, callback: A
| 错误码ID | 错误信息 |
| -------- | ------------------- |
| 12300001 |
S
ystem service exception. |
| 12300002 |
Invalid localId
. |
| 12300003 |
Account not found
. |
| 12300001 |
s
ystem service exception. |
| 12300002 |
invalid localId or constraint
. |
| 12300003 |
the account indicated by localId dose not exist
. |
**示例:**
判断ID为100的系统帐号是否有禁止使用Wi-Fi的约束
...
...
@@ -376,9 +376,9 @@ checkOsAccountConstraintEnabled(localId: number, constraint: string): Promise<
| 错误码ID | 错误信息 |
| -------- | ------------------- |
| 12300001 |
S
ystem service exception. |
| 12300002 |
Invalid localId
. |
| 12300003 |
Account not found
. |
| 12300001 |
s
ystem service exception. |
| 12300002 |
invalid localId or constraint
. |
| 12300003 |
the account indicated by localId dose not exist
. |
**示例:**
判断ID为100的系统帐号是否有禁止使用Wi-Fi的约束
...
...
@@ -475,8 +475,6 @@ checkOsAccountVerified(callback: AsyncCallback<boolean>): void
检查当前系统帐号是否已验证。使用callback异步回调。
**需要权限:**
ohos.permission.MANAGE_LOCAL_ACCOUNTS 或 ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
**系统能力:**
SystemCapability.Account.OsAccount
**参数:**
...
...
@@ -489,9 +487,7 @@ checkOsAccountVerified(callback: AsyncCallback<boolean>): void
| 错误码ID | 错误信息 |
| -------- | ------------------- |
| 12300001 | System service exception. |
| 12300002 | Invalid localId. |
| 12300003 | Account not found. |
| 12300001 | system service exception. |
**示例:**
...
...
@@ -531,9 +527,9 @@ checkOsAccountVerified(localId: number, callback: AsyncCallback<boolean>):
| 错误码ID | 错误信息 |
| -------- | ------------------- |
| 12300001 |
S
ystem service exception. |
| 12300002 |
I
nvalid localId. |
| 12300003 |
Account not found
. |
| 12300001 |
s
ystem service exception. |
| 12300002 |
i
nvalid localId. |
| 12300003 |
the account indicated by localId dose not exist
. |
**示例:**
...
...
@@ -555,7 +551,7 @@ checkOsAccountVerified(localId: number, callback: AsyncCallback<boolean>):
### checkOsAccountVerified<sup>9+</sup>
checkOsAccountVerified(localId
?
: number): Promise
<
boolean
>
checkOsAccountVerified(localId: number): Promise
<
boolean
>
检查指定系统帐号是否已验证。使用Promise异步回调。
...
...
@@ -567,7 +563,7 @@ checkOsAccountVerified(localId?: number): Promise<boolean>
| 参数名 | 类型 | 必填 | 说明 |
| ------- | ------ | ---- | --------------------------------------------------------------- |
| localId | number |
否
| 系统帐号ID。不填则检查当前系统帐号是否已验证。 |
| localId | number |
是
| 系统帐号ID。不填则检查当前系统帐号是否已验证。 |
**返回值:**
...
...
@@ -579,9 +575,9 @@ checkOsAccountVerified(localId?: number): Promise<boolean>
| 错误码ID | 错误信息 |
| -------- | ------------------- |
| 12300001 |
S
ystem service exception. |
| 12300002 |
I
nvalid localId. |
| 12300003 |
Account not found
. |
| 12300001 |
s
ystem service exception. |
| 12300002 |
i
nvalid localId. |
| 12300003 |
the account indicated by localId dose not exist
. |
**示例:**
...
...
@@ -991,7 +987,7 @@ getOsAccountLocalId(callback: AsyncCallback<number>): void
| 错误码ID | 错误信息 |
| -------- | ------------------- |
| 12300001 |
S
ystem service exception. |
| 12300001 |
s
ystem service exception. |
**示例:**
...
...
@@ -1028,7 +1024,7 @@ getOsAccountLocalId(): Promise<number>
| 错误码ID | 错误信息 |
| -------- | ------------------- |
| 12300001 |
S
ystem service exception. |
| 12300001 |
s
ystem service exception. |
**示例:**
...
...
@@ -1064,8 +1060,8 @@ getOsAccountLocalIdForUid(uid: number, callback: AsyncCallback<number>): v
| 错误码ID | 错误信息 |
| -------- | --------------- |
| 12300001 |
S
ystem service exception. |
| 12300002 |
I
nvalid uid. |
| 12300001 |
s
ystem service exception. |
| 12300002 |
i
nvalid uid. |
**示例:**
查询值为12345678的uid所属的系统帐号的帐号ID
...
...
@@ -1108,8 +1104,8 @@ getOsAccountLocalIdForUid(uid: number): Promise<number>
| 错误码ID | 错误信息 |
| -------- | ------------- |
| 12300001 |
S
ystem service exception. |
| 12300002 |
I
nvalid uid. |
| 12300001 |
s
ystem service exception. |
| 12300002 |
i
nvalid uid. |
**示例:**
查询值为12345678的uid所属的系统帐号ID
...
...
@@ -1148,8 +1144,8 @@ getOsAccountLocalIdForDomain(domainInfo: DomainAccountInfo, callback: AsyncCallb
| 错误码ID | 错误信息 |
| -------- | ------------- |
| 12300001 |
S
ystem service exception. |
| 12300002 |
I
nvalid domainInfo. |
| 12300001 |
s
ystem service exception. |
| 12300002 |
i
nvalid domainInfo. |
**示例:**
...
...
@@ -1195,8 +1191,8 @@ getOsAccountLocalIdForDomain(domainInfo: DomainAccountInfo): Promise<number&g
| 错误码ID | 错误信息 |
| -------- | ------------- |
| 12300001 |
S
ystem service exception. |
| 12300002 |
I
nvalid domainInfo. |
| 12300001 |
s
ystem service exception. |
| 12300002 |
i
nvalid domainInfo. |
**示例:**
...
...
@@ -1474,7 +1470,7 @@ getActivatedOsAccountLocalIds(callback: AsyncCallback<Array<number>>
| 错误码ID | 错误信息 |
| -------- | ------------- |
| 12300001 |
S
ystem service exception. |
| 12300001 |
s
ystem service exception. |
**示例:**
...
...
@@ -1511,7 +1507,7 @@ getActivatedOsAccountLocalIds(): Promise<Array<number>>
| 错误码ID | 错误信息 |
| -------- | ------------- |
| 12300001 |
S
ystem service exception. |
| 12300001 |
s
ystem service exception. |
**示例:**
...
...
@@ -2233,9 +2229,9 @@ getOsAccountLocalIdForSerialNumber(serialNumber: number, callback: AsyncCallback
| 错误码ID | 错误信息 |
| -------- | ------------------- |
| 12300001 |
S
ystem service exception. |
| 12300002 |
I
nvalid serialNumber. |
| 12300003 |
Account not found
. |
| 12300001 |
s
ystem service exception. |
| 12300002 |
i
nvalid serialNumber. |
| 12300003 |
the account indicated by serialNumber dose not exist
. |
**示例:**
查询与SN码12345关联的系统帐号的ID
...
...
@@ -2276,9 +2272,9 @@ getOsAccountLocalIdForSerialNumber(serialNumber: number): Promise<number>
| 错误码ID | 错误信息 |
| -------- | ------------------- |
| 12300001 |
S
ystem service exception. |
| 12300002 |
I
nvalid serialNumber. |
| 12300003 |
Account not found
. |
| 12300001 |
s
ystem service exception. |
| 12300002 |
i
nvalid serialNumber. |
| 12300003 |
the account indicated by serialNumber dose not exist
. |
**示例:**
查询与SN码12345关联的系统帐号的ID
...
...
@@ -2315,9 +2311,9 @@ getSerialNumberForOsAccountLocalId(localId: number, callback: AsyncCallback<n
| 错误码ID | 错误信息 |
| -------- | ------------------- |
| 12300001 |
S
ystem service exception. |
| 12300002 |
I
nvalid localId. |
| 12300003 |
Account not found
. |
| 12300001 |
s
ystem service exception. |
| 12300002 |
i
nvalid localId. |
| 12300003 |
the account indicated by localId dose not exist
. |
**示例:**
获取ID为100的系统帐号关联的SN码
...
...
@@ -2358,9 +2354,9 @@ getSerialNumberForOsAccountLocalId(localId: number): Promise<number>
| 错误码ID | 错误信息 |
| -------- | ------------------- |
| 12300001 |
S
ystem service exception. |
| 12300002 |
I
nvalid localId. |
| 12300003 |
Account not found
. |
| 12300001 |
s
ystem service exception. |
| 12300002 |
i
nvalid localId. |
| 12300003 |
the account indicated by localId dose not exist
. |
**示例:**
获取ID为100的系统帐号关联的SN码
...
...
@@ -2483,8 +2479,8 @@ getBundleIdForUid(uid: number, callback: AsyncCallback<number>): void;
| 错误码ID | 错误信息 |
| -------- | ------------- |
| 12300001 |
S
ystem service exception. |
| 12300002 |
I
nvalid uid. |
| 12300001 |
s
ystem service exception. |
| 12300002 |
i
nvalid uid. |
**示例:**
...
...
@@ -2526,8 +2522,8 @@ getBundleIdForUid(uid: number): Promise<number>;
| 错误码ID | 错误信息 |
| -------- | ------------- |
| 12300001 |
S
ystem service exception. |
| 12300002 |
I
nvalid uid. |
| 12300001 |
s
ystem service exception. |
| 12300002 |
i
nvalid uid. |
**示例:**
...
...
@@ -2644,9 +2640,9 @@ getOsAccountConstraintSourceTypes(localId: number, constraint: string, callback:
| 错误码ID | 错误信息 |
| -------- | ------------- |
| 12300001 |
S
ystem service exception. |
| 12300002 |
Invalid localId
or constraint. |
| 12300003 |
Account not found
. |
| 12300001 |
s
ystem service exception. |
| 12300002 |
invalid name
or constraint. |
| 12300003 |
the account indicated by localId dose not exist
. |
**示例:**
...
...
@@ -2691,9 +2687,9 @@ getOsAccountConstraintSourceTypes(localId: number, constraint: string): Promise&
| 错误码ID | 错误信息 |
| -------- | ------------- |
| 12300001 |
S
ystem service exception. |
| 12300002 |
Invalid localId
or constraint. |
| 12300003 |
Account not found
. |
| 12300001 |
s
ystem service exception. |
| 12300002 |
invalid name
or constraint. |
| 12300003 |
the account indicated by localId dose not exist
. |
**示例:**
...
...
@@ -5840,7 +5836,7 @@ onAcquireInfo?: (module: number, acquire: number, extraInfo: any) => void;
| PIN | 1 | 表示PIN认证类型。 |
| FACE | 2 | 表示脸部认证类型。|
| FINGERPRINT
<sup>
10+
</sup>
| 4 | 表示指纹认证类型。 |
| DOMAIN
<sup>
10
+
</sup>
| 1024 | 表示域认证类型。|
| DOMAIN
<sup>
9
+
</sup>
| 1024 | 表示域认证类型。|
## AuthSubType<sup>8+</sup>
...
...
@@ -5857,7 +5853,7 @@ onAcquireInfo?: (module: number, acquire: number, extraInfo: any) => void;
| PIN_MIXED | 10002 | 表示自定义混合凭据。 |
| FACE_2D | 20000 | 表示2D 人脸凭证。 |
| FACE_3D | 20001 | 表示3D 人脸凭证。 |
| DOMAIN_MIXED
<sup>
10
+
</sup>
| 10240001 | 表示域认证混合凭证。 |
| DOMAIN_MIXED
<sup>
9
+
</sup>
| 10240001 | 表示域认证混合凭证。 |
## AuthTrustLevel<sup>8+</sup>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录