diff --git a/zh-cn/application-dev/reference/apis/js-apis-contact.md b/zh-cn/application-dev/reference/apis/js-apis-contact.md index 1cc7f540dc1cb54fe0b44cad97081435f9beb013..674f65debd1491d3a6922b445d0fb73b08af3e00 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-contact.md +++ b/zh-cn/application-dev/reference/apis/js-apis-contact.md @@ -204,8 +204,8 @@ updateContact(contact: Contact, attrs: ContactAttributes, callback: AsyncCallbac contact.updateContact({ name: {fullName: 'xxx'}, phoneNumbers: [{phoneNumber: '138xxxxxxxx'}] - },{ - attributes:[contact.Attribute.ATTR_EMAIL, contact.Attribute.ATTR_NAME] + }, { + attributes: [contact.Attribute.ATTR_EMAIL, contact.Attribute.ATTR_NAME] }, (err) => { if (err) { console.log('updateContact callback: err->${JSON.stringify(err)}'); @@ -433,7 +433,7 @@ queryMyCard(attrs: ContactAttributes, callback: AsyncCallback<Contact>): v ```js contact.queryMyCard({ - attributes:[contact.Attribute.ATTR_EMAIL, contact.Attribute.ATTR_NAME] + attributes: [contact.Attribute.ATTR_EMAIL, contact.Attribute.ATTR_NAME] }, (err, data) => { if (err) { console.log(`queryMyCard callback: err->${JSON.stringify(err)}`); @@ -469,7 +469,7 @@ queryMyCard(attrs?: ContactAttributes): Promise<Contact> ```js let promise = contact.queryMyCard({ - attributes:[contact.Attribute.ATTR_EMAIL, contact.Attribute.ATTR_NAME] + attributes: [contact.Attribute.ATTR_EMAIL, contact.Attribute.ATTR_NAME] }); promise.then((data) => { console.log(`queryMyCard success: data->${JSON.stringify(data)}`); @@ -487,7 +487,7 @@ selectContact(callback: AsyncCallback<Array<Contact>>): void **需要权限**:ohos.permission.READ_CONTACTS -**系统能力**:SystemCapability.Applications.ContactsData +**系统能力**:SystemCapability.Applications.Contacts **参数:** @@ -516,7 +516,7 @@ selectContact(): Promise<Array<Contact>> **需要权限**:ohos.permission.READ_CONTACTS -**系统能力**:SystemCapability.Applications.Contacts、SystemCapability.Applications.ContactsData +**系统能力**:SystemCapability.Applications.Contacts **返回值:**