Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
3f68ba5b
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看板
未验证
提交
3f68ba5b
编写于
4月 27, 2023
作者:
O
openharmony_ci
提交者:
Gitee
4月 27, 2023
浏览文件
操作
浏览文件
下载
差异文件
!17643 fix demo code problem
Merge pull request !17643 from jidong/dev042501
上级
e8354c5f
74ff9522
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
22 addition
and
20 deletion
+22
-20
zh-cn/application-dev/reference/apis/js-apis-osAccount.md
zh-cn/application-dev/reference/apis/js-apis-osAccount.md
+22
-20
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-osAccount.md
浏览文件 @
3f68ba5b
...
@@ -4437,12 +4437,12 @@ auth(domainAccountInfo: DomainAccountInfo, credential: Uint8Array, callback: IUs
...
@@ -4437,12 +4437,12 @@ auth(domainAccountInfo: DomainAccountInfo, credential: Uint8Array, callback: IUs
});
});
},
},
authWithPopup
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithPopup
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithToken
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithToken
:
(
domainAccountInfo
,
token
,
callback
)
=>
{},
getAccountInfo
:
(
domain
,
accountName
,
callback
)
=>
{},
getAccountInfo
:
(
domain
,
accountName
,
callback
)
=>
{},
getAuthStatusInfo
:
(
domainAccountInfo
,
callback
)
=>
{},
getAuthStatusInfo
:
(
domainAccountInfo
,
callback
)
=>
{},
bindAccount
:
(
domainAccountInfo
,
localId
,
callback
)
=>
{},
bindAccount
:
(
domainAccountInfo
,
localId
,
callback
)
=>
{},
unbindAccount
:
(
domainAccountInfo
,
callback
)
=>
{},
unbindAccount
:
(
domainAccountInfo
,
callback
)
=>
{},
isAccountTokenValid
:
(
domainAccountInfo
,
callback
)
=>
{},
isAccountTokenValid
:
(
domainAccountInfo
,
token
,
callback
)
=>
{},
getAccessToken
:
(
options
,
callback
)
=>
{}
getAccessToken
:
(
options
,
callback
)
=>
{}
}
}
account_osAccount
.
DomainAccountManager
.
registerPlugin
(
plugin
);
account_osAccount
.
DomainAccountManager
.
registerPlugin
(
plugin
);
...
@@ -4492,12 +4492,12 @@ authWithPopup(domainAccountInfo: DomainAccountInfo, callback: IUserAuthCallback)
...
@@ -4492,12 +4492,12 @@ authWithPopup(domainAccountInfo: DomainAccountInfo, callback: IUserAuthCallback)
freezingTime
:
0
freezingTime
:
0
});
});
},
},
authWithToken
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithToken
:
(
domainAccountInfo
,
token
,
callback
)
=>
{},
getAccountInfo
:
(
domain
,
accountName
,
callback
)
=>
{},
getAccountInfo
:
(
domain
,
accountName
,
callback
)
=>
{},
getAuthStatusInfo
:
(
domainAccountInfo
,
callback
)
=>
{},
getAuthStatusInfo
:
(
domainAccountInfo
,
callback
)
=>
{},
bindAccount
:
(
domainAccountInfo
,
localId
,
callback
)
=>
{},
bindAccount
:
(
domainAccountInfo
,
localId
,
callback
)
=>
{},
unbindAccount
:
(
domainAccountInfo
,
callback
)
=>
{},
unbindAccount
:
(
domainAccountInfo
,
callback
)
=>
{},
isAccountTokenValid
:
(
domainAccountInfo
,
callback
)
=>
{},
isAccountTokenValid
:
(
domainAccountInfo
,
token
,
callback
)
=>
{},
getAccessToken
:
(
options
,
callback
)
=>
{}
getAccessToken
:
(
options
,
callback
)
=>
{}
}
}
account_osAccount
.
DomainAccountManager
.
registerPlugin
(
plugin
)
account_osAccount
.
DomainAccountManager
.
registerPlugin
(
plugin
)
...
@@ -4526,7 +4526,7 @@ authWithToken(domainAccountInfo: DomainAccountInfo, token: Uint8Array, callback:
...
@@ -4526,7 +4526,7 @@ authWithToken(domainAccountInfo: DomainAccountInfo, token: Uint8Array, callback:
let
plugin
=
{
let
plugin
=
{
auth
:
(
domainAccountInfo
,
credential
,
callback
)
=>
{},
auth
:
(
domainAccountInfo
,
credential
,
callback
)
=>
{},
authWithPopup
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithPopup
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithToken
:
(
domainAccountInfo
,
callback
)
=>
{
authWithToken
:
(
domainAccountInfo
,
token
,
callback
)
=>
{
// mock authentication
// mock authentication
// notify authentication result
// notify authentication result
callback
.
onResult
(
0
,
{
callback
.
onResult
(
0
,
{
...
@@ -4539,7 +4539,7 @@ authWithToken(domainAccountInfo: DomainAccountInfo, token: Uint8Array, callback:
...
@@ -4539,7 +4539,7 @@ authWithToken(domainAccountInfo: DomainAccountInfo, token: Uint8Array, callback:
getAuthStatusInfo
:
(
domainAccountInfo
,
callback
)
=>
{},
getAuthStatusInfo
:
(
domainAccountInfo
,
callback
)
=>
{},
bindAccount
:
(
domainAccountInfo
,
localId
,
callback
)
=>
{},
bindAccount
:
(
domainAccountInfo
,
localId
,
callback
)
=>
{},
unbindAccount
:
(
domainAccountInfo
,
callback
)
=>
{},
unbindAccount
:
(
domainAccountInfo
,
callback
)
=>
{},
isAccountTokenValid
:
(
domainAccountInfo
,
callback
)
=>
{},
isAccountTokenValid
:
(
domainAccountInfo
,
token
,
callback
)
=>
{},
getAccessToken
:
(
options
,
callback
)
=>
{}
getAccessToken
:
(
options
,
callback
)
=>
{}
}
}
account_osAccount
.
DomainAccountManager
.
registerPlugin
(
plugin
)
account_osAccount
.
DomainAccountManager
.
registerPlugin
(
plugin
)
...
@@ -4568,7 +4568,7 @@ getAccountInfo(domain: string, accountName: string, callback: AsyncCallback<D
...
@@ -4568,7 +4568,7 @@ getAccountInfo(domain: string, accountName: string, callback: AsyncCallback<D
let
plugin
=
{
let
plugin
=
{
auth
:
(
domainAccountInfo
,
credential
,
callback
)
=>
{},
auth
:
(
domainAccountInfo
,
credential
,
callback
)
=>
{},
authWithPopup
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithPopup
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithToken
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithToken
:
(
domainAccountInfo
,
token
,
callback
)
=>
{},
getAccountInfo
:
(
domain
,
accountName
,
callback
)
=>
{
getAccountInfo
:
(
domain
,
accountName
,
callback
)
=>
{
// mock getting account information
// mock getting account information
// notify result
// notify result
...
@@ -4583,7 +4583,7 @@ getAccountInfo(domain: string, accountName: string, callback: AsyncCallback<D
...
@@ -4583,7 +4583,7 @@ getAccountInfo(domain: string, accountName: string, callback: AsyncCallback<D
getAuthStatusInfo
:
(
domainAccountInfo
,
callback
)
=>
{},
getAuthStatusInfo
:
(
domainAccountInfo
,
callback
)
=>
{},
bindAccount
:
(
domainAccountInfo
,
localId
,
callback
)
=>
{},
bindAccount
:
(
domainAccountInfo
,
localId
,
callback
)
=>
{},
unbindAccount
:
(
domainAccountInfo
,
callback
)
=>
{},
unbindAccount
:
(
domainAccountInfo
,
callback
)
=>
{},
isAccountTokenValid
:
(
domainAccountInfo
,
callback
)
=>
{},
isAccountTokenValid
:
(
domainAccountInfo
,
token
,
callback
)
=>
{},
getAccessToken
:
(
options
,
callback
)
=>
{}
getAccessToken
:
(
options
,
callback
)
=>
{}
}
}
account_osAccount
.
DomainAccountManager
.
registerPlugin
(
plugin
)
account_osAccount
.
DomainAccountManager
.
registerPlugin
(
plugin
)
...
@@ -4611,7 +4611,7 @@ getAuthStatusInfo(domainAccountInfo: DomainAccountInfo, callback: AsyncCallback&
...
@@ -4611,7 +4611,7 @@ getAuthStatusInfo(domainAccountInfo: DomainAccountInfo, callback: AsyncCallback&
let
plugin
=
{
let
plugin
=
{
auth
:
(
domainAccountInfo
,
credential
,
callback
)
=>
{},
auth
:
(
domainAccountInfo
,
credential
,
callback
)
=>
{},
authWithPopup
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithPopup
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithToken
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithToken
:
(
domainAccountInfo
,
token
,
callback
)
=>
{},
getAccountInfo
:
(
domain
,
accountName
,
callback
)
=>
{},
getAccountInfo
:
(
domain
,
accountName
,
callback
)
=>
{},
getAuthStatusInfo
:
(
domainAccountInfo
,
callback
)
=>
{
getAuthStatusInfo
:
(
domainAccountInfo
,
callback
)
=>
{
callback
({
callback
({
...
@@ -4623,7 +4623,7 @@ getAuthStatusInfo(domainAccountInfo: DomainAccountInfo, callback: AsyncCallback&
...
@@ -4623,7 +4623,7 @@ getAuthStatusInfo(domainAccountInfo: DomainAccountInfo, callback: AsyncCallback&
},
},
bindAccount
:
(
domainAccountInfo
,
localId
,
callback
)
=>
{},
bindAccount
:
(
domainAccountInfo
,
localId
,
callback
)
=>
{},
unbindAccount
:
(
domainAccountInfo
,
callback
)
=>
{},
unbindAccount
:
(
domainAccountInfo
,
callback
)
=>
{},
isAccountTokenValid
:
(
domainAccountInfo
,
callback
)
=>
{},
isAccountTokenValid
:
(
domainAccountInfo
,
token
,
callback
)
=>
{},
getAccessToken
:
(
options
,
callback
)
=>
{}
getAccessToken
:
(
options
,
callback
)
=>
{}
}
}
account_osAccount
.
DomainAccountManager
.
registerPlugin
(
plugin
)
account_osAccount
.
DomainAccountManager
.
registerPlugin
(
plugin
)
...
@@ -4651,7 +4651,7 @@ bindAccount(domainAccountInfo: DomainAccountInfo, localId: number, callback: Asy
...
@@ -4651,7 +4651,7 @@ bindAccount(domainAccountInfo: DomainAccountInfo, localId: number, callback: Asy
let
plugin
=
{
let
plugin
=
{
auth
:
(
domainAccountInfo
,
credential
,
callback
)
=>
{},
auth
:
(
domainAccountInfo
,
credential
,
callback
)
=>
{},
authWithPopup
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithPopup
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithToken
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithToken
:
(
domainAccountInfo
,
token
,
callback
)
=>
{},
getAccountInfo
:
(
domain
,
accountName
,
callback
)
=>
{},
getAccountInfo
:
(
domain
,
accountName
,
callback
)
=>
{},
getAuthStatusInfo
:
(
domainAccountInfo
,
callback
)
=>
{},
getAuthStatusInfo
:
(
domainAccountInfo
,
callback
)
=>
{},
bindAccount
:
(
domainAccountInfo
,
localId
,
callback
)
=>
{
bindAccount
:
(
domainAccountInfo
,
localId
,
callback
)
=>
{
...
@@ -4660,7 +4660,7 @@ bindAccount(domainAccountInfo: DomainAccountInfo, localId: number, callback: Asy
...
@@ -4660,7 +4660,7 @@ bindAccount(domainAccountInfo: DomainAccountInfo, localId: number, callback: Asy
callback
({
code
:
0
})
callback
({
code
:
0
})
},
},
unbindAccount
:
(
domainAccountInfo
,
callback
)
=>
{},
unbindAccount
:
(
domainAccountInfo
,
callback
)
=>
{},
isAccountTokenValid
:
(
domainAccountInfo
,
callback
)
=>
{},
isAccountTokenValid
:
(
domainAccountInfo
,
token
,
callback
)
=>
{},
getAccessToken
:
(
options
,
callback
)
=>
{}
getAccessToken
:
(
options
,
callback
)
=>
{}
}
}
account_osAccount
.
DomainAccountManager
.
registerPlugin
(
plugin
)
account_osAccount
.
DomainAccountManager
.
registerPlugin
(
plugin
)
...
@@ -4688,7 +4688,7 @@ unbindAccount(domainAccountInfo: DomainAccountInfo, callback: AsyncCallback<v
...
@@ -4688,7 +4688,7 @@ unbindAccount(domainAccountInfo: DomainAccountInfo, callback: AsyncCallback<v
let
plugin
=
{
let
plugin
=
{
auth
:
(
domainAccountInfo
,
credential
,
callback
)
=>
{},
auth
:
(
domainAccountInfo
,
credential
,
callback
)
=>
{},
authWithPopup
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithPopup
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithToken
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithToken
:
(
domainAccountInfo
,
token
,
callback
)
=>
{},
getAccountInfo
:
(
domain
,
accountName
,
callback
)
=>
{},
getAccountInfo
:
(
domain
,
accountName
,
callback
)
=>
{},
getAuthStatusInfo
:
(
domainAccountInfo
,
callback
)
=>
{},
getAuthStatusInfo
:
(
domainAccountInfo
,
callback
)
=>
{},
bindAccount
:
(
domainAccountInfo
,
localId
,
callback
)
=>
{},
bindAccount
:
(
domainAccountInfo
,
localId
,
callback
)
=>
{},
...
@@ -4697,7 +4697,7 @@ unbindAccount(domainAccountInfo: DomainAccountInfo, callback: AsyncCallback<v
...
@@ -4697,7 +4697,7 @@ unbindAccount(domainAccountInfo: DomainAccountInfo, callback: AsyncCallback<v
// notify unbinding result
// notify unbinding result
callback
({
code
:
0
})
callback
({
code
:
0
})
},
},
isAccountTokenValid
:
(
domainAccountInfo
,
callback
)
=>
{},
isAccountTokenValid
:
(
domainAccountInfo
,
token
,
callback
)
=>
{},
getAccessToken
:
(
options
,
callback
)
=>
{}
getAccessToken
:
(
options
,
callback
)
=>
{}
}
}
account_osAccount
.
DomainAccountManager
.
registerPlugin
(
plugin
)
account_osAccount
.
DomainAccountManager
.
registerPlugin
(
plugin
)
...
@@ -4726,12 +4726,12 @@ isAccountTokenValid(domainAccountInfo: DomainAccountInfo, token: Uint8Array, cal
...
@@ -4726,12 +4726,12 @@ isAccountTokenValid(domainAccountInfo: DomainAccountInfo, token: Uint8Array, cal
let
plugin
=
{
let
plugin
=
{
auth
:
(
domainAccountInfo
,
credential
,
callback
)
=>
{},
auth
:
(
domainAccountInfo
,
credential
,
callback
)
=>
{},
authWithPopup
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithPopup
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithToken
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithToken
:
(
domainAccountInfo
,
token
,
callback
)
=>
{},
getAccountInfo
:
(
domain
,
accountName
,
callback
)
=>
{},
getAccountInfo
:
(
domain
,
accountName
,
callback
)
=>
{},
getAuthStatusInfo
:
(
domainAccountInfo
,
callback
)
=>
{},
getAuthStatusInfo
:
(
domainAccountInfo
,
callback
)
=>
{},
bindAccount
:
(
domainAccountInfo
,
localId
,
callback
)
=>
{},
bindAccount
:
(
domainAccountInfo
,
localId
,
callback
)
=>
{},
unbindAccount
:
(
domainAccountInfo
,
callback
)
=>
{},
unbindAccount
:
(
domainAccountInfo
,
callback
)
=>
{},
isAccountTokenValid
:
(
domainAccountInfo
,
callback
)
=>
{
isAccountTokenValid
:
(
domainAccountInfo
,
token
,
callback
)
=>
{
// mock checking operation
// mock checking operation
// notify checking result
// notify checking result
callback
({
code
:
0
},
true
);
callback
({
code
:
0
},
true
);
...
@@ -4763,12 +4763,12 @@ getAccessToken(options: GetDomainAccessTokenOptions, callback: AsyncCallback<
...
@@ -4763,12 +4763,12 @@ getAccessToken(options: GetDomainAccessTokenOptions, callback: AsyncCallback<
let
plugin
=
{
let
plugin
=
{
auth
:
(
domainAccountInfo
,
credential
,
callback
)
=>
{},
auth
:
(
domainAccountInfo
,
credential
,
callback
)
=>
{},
authWithPopup
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithPopup
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithToken
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithToken
:
(
domainAccountInfo
,
token
,
callback
)
=>
{},
getAccountInfo
:
(
domain
,
accountName
,
callback
)
=>
{},
getAccountInfo
:
(
domain
,
accountName
,
callback
)
=>
{},
getAuthStatusInfo
:
(
domainAccountInfo
,
callback
)
=>
{},
getAuthStatusInfo
:
(
domainAccountInfo
,
callback
)
=>
{},
bindAccount
:
(
domainAccountInfo
,
localId
,
callback
)
=>
{},
bindAccount
:
(
domainAccountInfo
,
localId
,
callback
)
=>
{},
unbindAccount
:
(
domainAccountInfo
,
callback
)
=>
{},
unbindAccount
:
(
domainAccountInfo
,
callback
)
=>
{},
isAccountTokenValid
:
(
domainAccountInfo
,
callback
)
=>
{},
isAccountTokenValid
:
(
domainAccountInfo
,
token
,
callback
)
=>
{},
getAccessToken
:
(
options
,
callback
)
=>
{
getAccessToken
:
(
options
,
callback
)
=>
{
// mock getting operation
// mock getting operation
let
token
=
new
Uint8Array
([
0
]);
let
token
=
new
Uint8Array
([
0
]);
...
@@ -4811,11 +4811,13 @@ static registerPlugin(plugin: DomainPlugin): void
...
@@ -4811,11 +4811,13 @@ static registerPlugin(plugin: DomainPlugin): void
let
plugin
=
{
let
plugin
=
{
auth
:
(
domainAccountInfo
,
credential
,
callback
)
=>
{},
auth
:
(
domainAccountInfo
,
credential
,
callback
)
=>
{},
authWithPopup
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithPopup
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithToken
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithToken
:
(
domainAccountInfo
,
token
,
callback
)
=>
{},
getAccountInfo
:
(
domain
,
accountName
,
callback
)
=>
{},
getAccountInfo
:
(
domain
,
accountName
,
callback
)
=>
{},
getAuthStatusInfo
:
(
domainAccountInfo
,
callback
)
=>
{},
getAuthStatusInfo
:
(
domainAccountInfo
,
callback
)
=>
{},
bindAccount
:
(
domainAccountInfo
,
localId
,
callback
)
=>
{},
bindAccount
:
(
domainAccountInfo
,
localId
,
callback
)
=>
{},
unbindAccount
:
(
domainAccountInfo
,
callback
)
=>
{}
unbindAccount
:
(
domainAccountInfo
,
callback
)
=>
{},
isAccountTokenValid
:
(
domainAccountInfo
,
token
,
callback
)
=>
{},
getAccessToken
:
(
options
,
callback
)
=>
{}
}
}
try
{
try
{
account_osAccount
.
DomainAccountManager
.
registerPlugin
(
plugin
);
account_osAccount
.
DomainAccountManager
.
registerPlugin
(
plugin
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录