Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
816d6321
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看板
提交
816d6321
编写于
6月 15, 2022
作者:
Q
qian-nan-xu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
CallUI document modification
Signed-off-by:
N
qian-nan-xu
<
xuqiannan@huawei.com
>
上级
86a8f58b
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
64 addition
and
32 deletion
+64
-32
zh-cn/application-dev/reference/apis/js-apis-contact.md
zh-cn/application-dev/reference/apis/js-apis-contact.md
+64
-32
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-contact.md
浏览文件 @
816d6321
...
...
@@ -195,7 +195,7 @@ updateContact(contact: Contact, attrs: ContactAttributes, callback: AsyncCallbac
fullName
:
{
fullName
:
'
xxx
'
},
phoneNumbers
:
[{
phoneNumber
:
'
138xxxxxxxx
'
}]
},{
attributes
:[
'
ATTR_EMAIL
'
,
'
ATTR_NAME
'
]
attributes
:[
contact
.
Attribute
.
ATTR_EMAIL
,
contact
.
Attribute
.
ATTR_NAME
]
},
(
err
)
=>
{
if
(
err
)
{
console
.
log
(
'
updateContact callback: err->${JSON.stringify(err)}
'
);
...
...
@@ -234,7 +234,7 @@ updateContact(contact: Contact, attrs?: ContactAttributes): Promise<void>
fullName
:
{
fullName
:
'
xxx
'
},
phoneNumbers
:
[{
phoneNumber
:
'
138xxxxxxxx
'
}]
},
{
attributes
:
[
"
ATTR_EMAIL
"
,
"
ATTR_NAME
"
]
attributes
:
[
contact
.
Attribute
.
ATTR_EMAIL
,
contact
.
Attribute
.
ATTR_NAME
]
});
promise
.
then
(()
=>
{
console
.
log
(
'
updateContact success
'
);
...
...
@@ -414,7 +414,7 @@ queryMyCard(attrs: ContactAttributes, callback: AsyncCallback<Contact>): v
```
js
contact
.
queryMyCard
({
attributes
:[
'
ATTR_EMAIL
'
,
'
ATTR_NAME
'
]
attributes
:[
contact
.
Attribute
.
ATTR_EMAIL
,
contact
.
Attribute
.
ATTR_NAME
]
},
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
log
(
`queryMyCard callback: err->
${
JSON
.
stringify
(
err
)}
`
);
...
...
@@ -449,7 +449,7 @@ queryMyCard(attrs?: ContactAttributes): Promise<Contact>
```
js
let
promise
=
contact
.
queryMyCard
({
attributes
:[
'
ATTR_EMAIL
'
,
'
ATTR_NAME
'
]
attributes
:[
contact
.
Attribute
.
ATTR_EMAIL
,
contact
.
Attribute
.
ATTR_NAME
]
});
promise
.
then
((
data
)
=>
{
console
.
log
(
`queryMyCard success: data->
${
JSON
.
stringify
(
data
)}
`
);
...
...
@@ -564,7 +564,9 @@ queryContact(key: string, holder: Holder, callback: AsyncCallback<Contact>
```
js
contact
.
queryContact
(
'
xxx
'
,
{
holderId
:
0
holderId
:
0
,
bundleName
:
""
,
displayName
:
""
},
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
log
(
`queryContact callback: err->
${
JSON
.
stringify
(
err
)}
`
);
...
...
@@ -596,7 +598,7 @@ queryContact(key: string, attrs: ContactAttributes, callback: AsyncCallback<
```
js
contact
.
queryContact
(
'
xxx
'
,
{
attributes
:
[
"
ATTR_EMAIL
"
,
"
ATTR_NAME
"
]
attributes
:
[
contact
.
Attribute
.
ATTR_EMAIL
,
contact
.
Attribute
.
ATTR_NAME
]
},
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
log
(
`queryContact callback: err->
${
JSON
.
stringify
(
err
)}
`
);
...
...
@@ -629,9 +631,11 @@ queryContact(key: string, holder: Holder, attrs: ContactAttributes, callback: As
```
js
contact
.
queryContact
(
'
xxx
'
,
{
holderId
:
0
holderId
:
0
,
bundleName
:
""
,
displayName
:
""
},
{
attributes
:
[
"
ATTR_EMAIL
"
,
"
ATTR_NAME
"
]
attributes
:
[
contact
.
Attribute
.
ATTR_EMAIL
,
contact
.
Attribute
.
ATTR_NAME
]
},
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
log
(
`queryContact callback: err->
${
JSON
.
stringify
(
err
)}
`
);
...
...
@@ -668,9 +672,11 @@ queryContact(key: string, holder?: Holder, attrs?: ContactAttributes): Promise&l
```
js
let
promise
=
contact
.
queryContact
(
'
xxx
'
,
{
holderId
:
0
holderId
:
0
,
bundleName
:
""
,
displayName
:
""
},
{
attributes
:
[
"
ATTR_EMAIL
"
,
"
ATTR_NAME
"
]
attributes
:
[
contact
.
Attribute
.
ATTR_EMAIL
,
contact
.
Attribute
.
ATTR_NAME
]
});
promise
.
then
((
data
)
=>
{
console
.
log
(
`queryContact success: data->
${
JSON
.
stringify
(
data
)}
`
);
...
...
@@ -728,7 +734,9 @@ queryContacts(holder: Holder, callback: AsyncCallback<Array<Contact>>
```
js
contact
.
queryContacts
({
holderId
:
0
holderId
:
0
,
bundleName
:
""
,
displayName
:
""
},
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
log
(
`queryContacts callback: err->
${
JSON
.
stringify
(
err
)}
`
);
...
...
@@ -759,7 +767,7 @@ queryContacts(attrs: ContactAttributes, callback: AsyncCallback<Array<Cont
```
js
contact
.
queryContacts
({
attributes
:
[
"
ATTR_EMAIL
"
,
"
ATTR_NAME
"
]
attributes
:
[
contact
.
Attribute
.
ATTR_EMAIL
,
contact
.
Attribute
.
ATTR_NAME
]
},
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
log
(
`queryContacts callback: err->
${
JSON
.
stringify
(
err
)}
`
);
...
...
@@ -791,9 +799,11 @@ queryContacts(holder: Holder, attrs: ContactAttributes, callback: AsyncCallback&
```
js
contact
.
queryContacts
({
holderId
:
0
holderId
:
0
,
bundleName
:
""
,
displayName
:
""
},
{
attributes
:
[
"
ATTR_EMAIL
"
,
"
ATTR_NAME
"
]
attributes
:
[
contact
.
Attribute
.
ATTR_EMAIL
,
contact
.
Attribute
.
ATTR_NAME
]
},
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
log
(
`queryContacts callback: err->
${
JSON
.
stringify
(
err
)}
`
);
...
...
@@ -829,9 +839,11 @@ queryContacts(holder?: Holder, attrs?: ContactAttributes): Promise<Array<C
```
js
let
promise
=
contact
.
queryContacts
({
holderId
:
0
holderId
:
0
,
bundleName
:
""
,
displayName
:
""
},
{
attributes
:
[
"
ATTR_EMAIL
"
,
"
ATTR_NAME
"
]
attributes
:
[
contact
.
Attribute
.
ATTR_EMAIL
,
contact
.
Attribute
.
ATTR_NAME
]
});
promise
.
then
((
data
)
=>
{
console
.
log
(
`queryContacts success: data->
${
JSON
.
stringify
(
data
)}
`
);
...
...
@@ -891,7 +903,9 @@ queryContactsByPhoneNumber(phoneNumber: string, holder: Holder, callback: AsyncC
```
js
contact
.
queryContactsByPhoneNumber
(
'
138xxxxxxxx
'
,
{
holderId
:
0
holderId
:
0
,
bundleName
:
""
,
displayName
:
""
},
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
log
(
`queryContactsByPhoneNumber callback: err->
${
JSON
.
stringify
(
err
)}
`
);
...
...
@@ -923,7 +937,7 @@ queryContactsByPhoneNumber(phoneNumber: string, attrs: ContactAttributes, callba
```
js
contact
.
queryContactsByPhoneNumber
(
'
138xxxxxxxx
'
,
{
attributes
:
[
"
ATTR_EMAIL
"
,
"
ATTR_NAME
"
]
attributes
:
[
contact
.
Attribute
.
ATTR_EMAIL
,
contact
.
Attribute
.
ATTR_NAME
]
},
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
log
(
`queryContactsByPhoneNumber callback: err->
${
JSON
.
stringify
(
err
)}
`
);
...
...
@@ -956,9 +970,11 @@ queryContactsByPhoneNumber(phoneNumber: string, holder: Holder, attrs: ContactAt
```
js
contact
.
queryContactsByPhoneNumber
(
'
138xxxxxxxx
'
,
{
holderId
:
0
holderId
:
0
,
bundleName
:
""
,
displayName
:
""
},
{
attributes
:
[
"
ATTR_EMAIL
"
,
"
ATTR_NAME
"
]
attributes
:
[
contact
.
Attribute
.
ATTR_EMAIL
,
contact
.
Attribute
.
ATTR_NAME
]
},
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
log
(
`queryContactsByPhoneNumber callback: err->
${
JSON
.
stringify
(
err
)}
`
);
...
...
@@ -995,9 +1011,11 @@ queryContactsByPhoneNumber(phoneNumber: string, holder?: Holder, attrs?: Contact
```
js
let
promise
=
contact
.
queryContactsByPhoneNumber
(
'
138xxxxxxxx
'
,
{
holderId
:
0
holderId
:
0
,
bundleName
:
""
,
displayName
:
""
},
{
attributes
:
[
"
ATTR_EMAIL
"
,
"
ATTR_NAME
"
]
attributes
:
[
contact
.
Attribute
.
ATTR_EMAIL
,
contact
.
Attribute
.
ATTR_NAME
]
});
promise
.
then
((
data
)
=>
{
console
.
log
(
`queryContactsByPhoneNumber success: data->
${
JSON
.
stringify
(
data
)}
`
);
...
...
@@ -1057,7 +1075,9 @@ queryContactsByEmail(email: string, holder: Holder, callback: AsyncCallback<A
```
js
contact
.
queryContactsByEmail
(
'
xxx@email.com
'
,
{
holderId
:
0
holderId
:
0
,
bundleName
:
""
,
displayName
:
""
},
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
log
(
`queryContactsByEmail callback: err->
${
JSON
.
stringify
(
err
)}
`
);
...
...
@@ -1089,7 +1109,7 @@ queryContactsByEmail(email: string, attrs: ContactAttributes, callback: AsyncCal
```
js
contact
.
queryContactsByEmail
(
'
xxx@email.com
'
,
{
attributes
:
[
"
ATTR_EMAIL
"
,
"
ATTR_NAME
"
]
attributes
:
[
contact
.
Attribute
.
ATTR_EMAIL
,
contact
.
Attribute
.
ATTR_NAME
]
},
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
log
(
`queryContactsByEmail callback: err->
${
JSON
.
stringify
(
err
)}
`
);
...
...
@@ -1122,9 +1142,11 @@ queryContactsByEmail(email: string, holder: Holder, attrs: ContactAttributes, ca
```
js
contact
.
queryContactsByEmail
(
'
xxx@email.com
'
,
{
holderId
:
0
holderId
:
0
,
bundleName
:
""
,
displayName
:
""
},
{
attributes
:
[
"
ATTR_EMAIL
"
,
"
ATTR_NAME
"
]
attributes
:
[
contact
.
Attribute
.
ATTR_EMAIL
,
contact
.
Attribute
.
ATTR_NAME
]
},
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
log
(
`queryContactsByEmail callback: err->
${
JSON
.
stringify
(
err
)}
`
);
...
...
@@ -1161,9 +1183,11 @@ queryContactsByEmail(email: string, holder?: Holder, attrs?: ContactAttributes):
```
js
let
promise
=
contact
.
queryContactsByEmail
(
'
xxx@email.com
'
,
{
holderId
:
0
holderId
:
0
,
bundleName
:
""
,
displayName
:
""
},
{
attributes
:
[
"
ATTR_EMAIL
"
,
"
ATTR_NAME
"
]
attributes
:
[
contact
.
Attribute
.
ATTR_EMAIL
,
contact
.
Attribute
.
ATTR_NAME
]
});
promise
.
then
((
data
)
=>
{
console
.
log
(
`queryContactsByEmail success: data->
${
JSON
.
stringify
(
data
)}
`
);
...
...
@@ -1221,7 +1245,9 @@ queryGroups(holder: Holder, callback: AsyncCallback<Array<Group>>):
```
js
contact
.
queryGroups
({
holderId
:
0
holderId
:
0
,
bundleName
:
""
,
displayName
:
""
},
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
log
(
`queryGroups callback: err->
${
JSON
.
stringify
(
err
)}
`
);
...
...
@@ -1256,7 +1282,9 @@ queryGroups(holder?: Holder): Promise<Array<Group>>
```
js
let
promise
=
contact
.
queryGroups
({
holderId
:
0
holderId
:
0
,
bundleName
:
""
,
displayName
:
""
});
promise
.
then
((
data
)
=>
{
console
.
log
(
`queryGroups success: data->
${
JSON
.
stringify
(
data
)}
`
);
...
...
@@ -1371,7 +1399,9 @@ queryKey(id: number, holder: Holder, callback: AsyncCallback<string>): voi
```
js
contact
.
queryKey
(
id
,
{
holderId
:
1
holderId
:
0
,
bundleName
:
""
,
displayName
:
""
},
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
log
(
`queryKey callback: err->
${
JSON
.
stringify
(
err
)}
`
);
...
...
@@ -1407,7 +1437,9 @@ queryKey(id: number, holder?: Holder): Promise<string>
```
js
let
promise
=
contact
.
queryKey
(
id
,
{
holderId
:
0
holderId
:
0
,
bundleName
:
""
,
displayName
:
""
});
promise
.
then
((
data
)
=>
{
console
.
log
(
`queryKey success: data->
${
JSON
.
stringify
(
data
)}
`
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录