官方文档:https://uniapp.dcloud.net.cn/api/system/contact.html#addphonecontact
created() { //#ifdef APP-PLUS this.getLocalContact() //#endif },
methods: { getLocalContact() { let type = plus.contacts.ADDRESSBOOK_PHONE plus.contacts.getAddressBook( type, success => { success.find([], res => { this.localContact = res.map(item => { return { realName: item.displayName, phone: item.phoneNumbers[0].value } }) }, err => { } ) }, error => { console.log(error); } ) } }
标签:uniapp,读取,contacts,res,item,通讯录,type From: https://www.cnblogs.com/angia/p/17382490.html