Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Coping0606
Docs
提交
d4fdd1e1
D
Docs
项目概览
Coping0606
/
Docs
与 Fork 源项目一致
Fork自
OpenHarmony / Docs
通知
1
Star
1
Fork
0
代码
文件
提交
分支
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
d4fdd1e1
编写于
3月 22, 2022
作者:
O
openharmony_ci
提交者:
Gitee
3月 22, 2022
浏览文件
操作
浏览文件
下载
差异文件
!2308 自动化测试问题修改
Merge pull request !2308 from LiAn/master
上级
95d19fba
921b1178
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
34 addition
and
37 deletion
+34
-37
zh-cn/application-dev/reference/apis/js-apis-application-ability.md
...ication-dev/reference/apis/js-apis-application-ability.md
+0
-2
zh-cn/application-dev/reference/apis/js-apis-enterprise-device-manager.md
...n-dev/reference/apis/js-apis-enterprise-device-manager.md
+8
-8
zh-cn/application-dev/reference/apis/js-apis-eventhub.md
zh-cn/application-dev/reference/apis/js-apis-eventhub.md
+1
-1
zh-cn/application-dev/reference/apis/js-apis-lightweightset.md
.../application-dev/reference/apis/js-apis-lightweightset.md
+2
-2
zh-cn/application-dev/reference/apis/js-apis-missionManager.md
.../application-dev/reference/apis/js-apis-missionManager.md
+16
-16
zh-cn/application-dev/reference/apis/js-apis-useriam-userauth.md
...pplication-dev/reference/apis/js-apis-useriam-userauth.md
+7
-8
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-application-ability.md
浏览文件 @
d4fdd1e1
...
...
@@ -363,7 +363,6 @@ callWithResult(method: string, data: rpc.Sequenceable): Promise<rpc.MessagePa
this
.
name
=
name
;
this
.
str
=
str
;
}
constructor
()
{}
marshalling
(
messageParcel
)
{
messageParcel
.
writeInt
(
this
.
num
);
messageParcel
.
writeString
(
this
.
str
);
...
...
@@ -380,7 +379,6 @@ callWithResult(method: string, data: rpc.Sequenceable): Promise<rpc.MessagePa
var
method
=
'
call_Function
'
;
var
caller
;
export
default
class
MainAbility
extends
Ability
{
onWindowStageCreate
(
windowStage
)
{
onWindowStageCreate
(
windowStage
)
{
this
.
context
.
startAbilityByCall
({
bundleName
:
"
com.example.myservice
"
,
...
...
zh-cn/application-dev/reference/apis/js-apis-enterprise-device-manager.md
浏览文件 @
d4fdd1e1
...
...
@@ -40,8 +40,8 @@ let wantTemp = {
abilityName: "com.example.myapplication.MainAbility",
};
let enterpriseInfo = {
name
=
"enterprise name",
description
=
"enterprise description"
name
:
"enterprise name",
description
:
"enterprise description"
}
enterpriseDeviceManager.activateAdmin(wantTemp, enterpriseInfo, enterpriseDeviceManager.AdminType.ADMIN_TYPE_NORMAL, (error, result) => {
if (error != null) {
...
...
@@ -86,8 +86,8 @@ let wantTemp = {
abilityName: "com.example.myapplication.MainAbility",
};
let enterpriseInfo = {
name
=
"enterprise name",
description
=
"enterprise description"
name
:
"enterprise name",
description
:
"enterprise description"
}
enterpriseDeviceManager.activateAdmin(wantTemp, enterpriseInfo, enterpriseDeviceManager.AdminType.ADMIN_TYPE_NORMAL)
.then((result) => {
...
...
@@ -461,8 +461,8 @@ let wantTemp = {
abilityName: "com.example.myapplication.MainAbility",
};
let enterpriseInfo = {
name
=
"enterprise name",
description
=
"enterprise description"
name
:
"enterprise name",
description
:
"enterprise description"
}
enterpriseDeviceManager.setEnterpriseInfo(wantTemp, enterpriseInfo)
.then((result) => {
...
...
@@ -503,8 +503,8 @@ let wantTemp = {
abilityName: "com.example.myapplication.MainAbility",
};
let enterpriseInfo = {
name
=
"enterprise name",
description
=
"enterprise description"
name
:
"enterprise name",
description
:
"enterprise description"
}
enterpriseDeviceManager.setEnterpriseInfo(wantTemp, enterpriseInfo)
.then((result) => {
...
...
zh-cn/application-dev/reference/apis/js-apis-eventhub.md
浏览文件 @
d4fdd1e1
...
...
@@ -133,7 +133,7 @@ emit(event: string, ...args: Object[]): void;
// func1 is called,1,2
this
.
context
.
eventHub
.
emit
(
"
123
"
,
1
,
2
);
}
func1
(
a
:
string
,
b
:
string
)
{
func1
(
a
,
b
)
{
console
.
log
(
"
func1 is called,
"
+
a
+
"
,
"
+
b
);
}
}
...
...
zh-cn/application-dev/reference/apis/js-apis-lightweightset.md
浏览文件 @
d4fdd1e1
...
...
@@ -160,7 +160,7 @@ has(key: T): boolean
let lightWeightSet = new LightWeightSet();
let result = lightWeightSet.has(123);
lightWeightSet.add(123);
let
result = lightWeightSet.has(123);
result = lightWeightSet.has(123);
```
...
...
@@ -188,7 +188,7 @@ equal(obj: Object): boolean
let lightWeightSet = new LightWeightSet();
lightWeightSet.add("Ahfbrgrbgnutfodgorrogorgrogofdfdf");
lightWeightSet.add("sdfs");
let obj =
{"Ahfbrgrbgnutfodgorrogorgrogofdfdf", "sdfs"}
;
let obj =
["Ahfbrgrbgnutfodgorrogorgrogofdfdf", "sdfs"]
;
let result = lightWeightSet.equal(obj);
```
...
...
zh-cn/application-dev/reference/apis/js-apis-missionManager.md
浏览文件 @
d4fdd1e1
...
...
@@ -110,7 +110,7 @@ function unregisterMissionListener(listenerId: number): Promise<void>;
console
.
log
(
"
registerMissionListener
"
)
var
listenerid
=
missionManager
.
registerMissionListener
(
listener
);
await
missionManager
.
unregisterMissionListener
(
listenerid
).
catch
(
function
(
err
){
missionManager
.
unregisterMissionListener
(
listenerid
).
catch
(
function
(
err
){
console
.
log
(
err
);
});
```
...
...
@@ -145,7 +145,7 @@ function getMissionInfo(deviceId: string, missionId: number, callback: AsyncCall
console
.
log
(
"
mission.timestamp =
"
+
mission
.
timestamp
);
console
.
log
(
"
mission.label =
"
+
mission
.
label
);
console
.
log
(
"
mission.iconPath =
"
+
mission
.
iconPath
);
}
}
);
```
...
...
@@ -175,7 +175,7 @@ function getMissionInfo(deviceId: string, missionId: number): Promise<Mission
```
js
import
missionManager
from
'
@ohos.application.missionManager
'
var
mission
=
await
missionManager
.
getMissionInfo
(
""
,
id
).
catch
(
function
(
err
){
var
mission
=
missionManager
.
getMissionInfo
(
""
,
id
).
catch
(
function
(
err
){
console
.
log
(
err
);
});
```
...
...
@@ -236,7 +236,7 @@ function getMissionInfos(deviceId: string, numMax: number): Promise<Array<
```
js
import
missionManager
from
'
@ohos.application.missionManager
'
var
allMissions
=
await
missionManager
.
getMissionInfos
(
""
,
10
).
catch
(
function
(
err
){
var
allMissions
=
missionManager
.
getMissionInfos
(
""
,
10
).
catch
(
function
(
err
){
console
.
log
(
err
);
});
```
...
...
@@ -303,13 +303,13 @@ function getMissionSnapShot(deviceId: string, missionId: number): Promise<Mis
```
js
import
missionManager
from
'
@ohos.application.missionManager
'
var
allMissions
=
await
missionManager
.
getMissionInfos
(
""
,
10
).
catch
(
function
(
err
){
var
allMissions
=
missionManager
.
getMissionInfos
(
""
,
10
).
catch
(
function
(
err
){
console
.
log
(
err
);
});
console
.
log
(
"
size =
"
+
allMissions
.
length
);
console
.
log
(
"
missions =
"
+
JSON
.
stringify
(
allMissions
));
var
id
=
allMissions
[
0
].
missionId
;
var
snapshot
=
await
missionManager
.
getMissionSnapShot
(
""
,
id
).
catch
(
function
(
err
){
var
snapshot
=
missionManager
.
getMissionSnapShot
(
""
,
id
).
catch
(
function
(
err
){
console
.
log
(
err
);
});
```
...
...
@@ -367,14 +367,14 @@ function lockMission(missionId: number): Promise<void>;
```
js
import
missionManager
from
'
@ohos.application.missionManager
'
var
allMissions
=
await
missionManager
.
getMissionInfos
(
""
,
10
).
catch
(
function
(
err
){
var
allMissions
=
missionManager
.
getMissionInfos
(
""
,
10
).
catch
(
function
(
err
){
console
.
log
(
err
);
});
console
.
log
(
"
size =
"
+
allMissions
.
length
);
console
.
log
(
"
missions =
"
+
JSON
.
stringify
(
allMissions
));
var
id
=
allMissions
[
0
].
missionId
;
await
missionManager
.
lockMission
(
id
).
catch
(
function
(
err
){
missionManager
.
lockMission
(
id
).
catch
(
function
(
err
){
console
.
log
(
err
);
});
```
...
...
@@ -431,17 +431,17 @@ function unlockMission(missionId: number): Promise<void>;
```
js
import
missionManager
from
'
@ohos.application.missionManager
'
var
allMissions
=
await
missionManager
.
getMissionInfos
(
""
,
10
).
catch
(
function
(
err
){
var
allMissions
=
missionManager
.
getMissionInfos
(
""
,
10
).
catch
(
function
(
err
){
console
.
log
(
err
);
});
console
.
log
(
"
size =
"
+
allMissions
.
length
);
console
.
log
(
"
missions =
"
+
JSON
.
stringify
(
allMissions
));
var
id
=
allMissions
[
0
].
missionId
;
await
missionManager
.
lockMission
(
id
).
catch
(
function
(
err
){
missionManager
.
lockMission
(
id
).
catch
(
function
(
err
){
console
.
log
(
err
);
});
await
missionManager
.
unlockMission
(
id
).
catch
(
function
(
err
){
missionManager
.
unlockMission
(
id
).
catch
(
function
(
err
){
console
.
log
(
err
);
});
```
...
...
@@ -499,14 +499,14 @@ function clearMission(missionId: number): Promise<void>;
```
js
import
missionManager
from
'
@ohos.application.missionManager
'
var
allMissions
=
await
missionManager
.
getMissionInfos
(
""
,
10
).
catch
(
function
(
err
){
var
allMissions
=
missionManager
.
getMissionInfos
(
""
,
10
).
catch
(
function
(
err
){
console
.
log
(
err
);
});
console
.
log
(
"
size =
"
+
allMissions
.
length
);
console
.
log
(
"
missions =
"
+
JSON
.
stringify
(
allMissions
));
var
id
=
allMissions
[
0
].
missionId
;
await
missionManager
.
clearMission
(
id
).
catch
(
function
(
err
){
missionManager
.
clearMission
(
id
).
catch
(
function
(
err
){
console
.
log
(
err
);
});
```
...
...
@@ -543,7 +543,7 @@ function clearAllMissions(): Promise<void>;
```
js
import
missionManager
from
'
@ohos.application.missionManager
'
await
missionManager
.
clearAllMissions
().
catch
(
function
(
err
){
missionManager
.
clearAllMissions
().
catch
(
function
(
err
){
console
.
log
(
err
);
});
```
...
...
@@ -636,14 +636,14 @@ function moveMissionToFront(missionId: number, options?: StartOptions): Promise&
```
js
import
missionManager
from
'
@ohos.application.missionManager
'
var
allMissions
=
await
missionManager
.
getMissionInfos
(
""
,
10
).
catch
(
function
(
err
){
var
allMissions
=
missionManager
.
getMissionInfos
(
""
,
10
).
catch
(
function
(
err
){
console
.
log
(
err
);
});
console
.
log
(
"
size =
"
+
allMissions
.
length
);
console
.
log
(
"
missions =
"
+
JSON
.
stringify
(
allMissions
));
var
id
=
allMissions
[
0
].
missionId
;
await
missionManager
.
moveMissionToFront
(
id
).
catch
(
function
(
err
){
missionManager
.
moveMissionToFront
(
id
).
catch
(
function
(
err
){
console
.
log
(
err
);
});
```
zh-cn/application-dev/reference/apis/js-apis-useriam-userauth.md
浏览文件 @
d4fdd1e1
...
...
@@ -34,24 +34,23 @@ export default {
```
js
// API version 8
import
userIAM_userAuth
from
'
@ohos.userIAM.userAuth
'
;
let
auth
=
new
userIAM_userAuth
.
UserAuth
();
export
default
{
let
auth
=
new
userIAM_userAuth
.
UserAuth
();
getVersion
()
{
console
.
info
(
"
start get version
"
);
let
version
=
auth
.
getVersion
();
let
version
=
this
.
auth
.
getVersion
();
console
.
info
(
"
auth version =
"
+
version
);
},
startAuth
()
{
console
.
info
(
"
start auth
"
);
auth
.
auth
(
null
,
userIAM_userAuth
.
UserAuthType
.
FACE
,
userIAM_userAuth
.
AuthTrustLevel
.
ATL1
,
{
this
.
auth
.
auth
(
null
,
userIAM_userAuth
.
UserAuthType
.
FACE
,
userIAM_userAuth
.
AuthTrustLevel
.
ATL1
,
{
onResult
:
(
result
,
extraInfo
)
=>
{
try
{
console
.
info
(
"
auth onResult result =
"
+
result
);
console
.
info
(
"
auth onResult extraInfo =
"
+
JSON
.
stringify
(
extraInfo
));
if
(
result
==
SUCCESS
)
{
if
(
result
==
'
SUCCESS
'
)
{
// 此处添加认证成功逻辑
}
else
{
// 此处添加认证失败逻辑
...
...
@@ -75,7 +74,7 @@ export default {
checkAuthSupport
()
{
console
.
info
(
"
start check auth support
"
);
let
checkCode
=
auth
.
getAvailableStatus
(
userIAM_userAuth
.
UserAuthType
.
FACE
,
userIAM_userAuth
.
AuthTrustLevel
.
ATL1
);
let
checkCode
=
this
.
auth
.
getAvailableStatus
(
userIAM_userAuth
.
UserAuthType
.
FACE
,
userIAM_userAuth
.
AuthTrustLevel
.
ATL1
);
if
(
checkCode
==
userIAM_userAuth
.
ResultCode
.
SUCCESS
)
{
console
.
info
(
"
check auth support success
"
);
// 此处添加支持指定类型认证的逻辑
...
...
@@ -91,13 +90,13 @@ export default {
let
contextId
=
auth
.
auth
(
null
,
userIAM_userAuth
.
UserAuthType
.
FACE
,
userIAM_userAuth
.
AuthTrustLevel
.
ATL1
,
{
onResult
:
(
result
,
extraInfo
)
=>
{
console
.
info
(
"
auth onResult result =
"
+
result
);
}
}
,
onAcquireInfo
:
(
module
,
acquire
,
extraInfo
)
=>
{
console
.
info
(
"
auth onAcquireInfo module =
"
+
module
);
}
});
let
cancelCode
=
auth
.
cancel
(
contextId
);
let
cancelCode
=
this
.
auth
.
cancel
(
contextId
);
if
(
cancelCode
==
userIAM_userAuth
.
Result
.
SUCCESS
)
{
console
.
info
(
"
cancel auth success
"
);
}
else
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录