惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

MyScale Blog
MyScale Blog
Apple Machine Learning Research
Apple Machine Learning Research
H
Help Net Security
雷峰网
雷峰网
V
Visual Studio Blog
G
Google Developers Blog
Microsoft Azure Blog
Microsoft Azure Blog
Hugging Face - Blog
Hugging Face - Blog
爱范儿
爱范儿
IT之家
IT之家
Engineering at Meta
Engineering at Meta
Microsoft Security Blog
Microsoft Security Blog
aimingoo的专栏
aimingoo的专栏
大猫的无限游戏
大猫的无限游戏
M
MIT News - Artificial intelligence
月光博客
月光博客
A
About on SuperTechFans
B
Blog RSS Feed
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The GitHub Blog
The GitHub Blog
N
Netflix TechBlog - Medium
J
Java Code Geeks
云风的 BLOG
云风的 BLOG
Blog — PlanetScale
Blog — PlanetScale

SangSir丨艺术界的一朵奇葩丨至一网络科技

Windows 使用 Hyper-V 网络上传速度异常慢解决方案 Mac homebrew 升级导致的 php 不能正常启动 dyld[40013]: Library not loaded: /opt/homebrew/opt/icu4c/lib/libicuio Uniapp h5部署到服务器刷新页面出现404 天地图修改主题颜色修改背景色 宝塔服务器多站点配置多个redis节点以及自启动方案 Part.Three. 前端JOB MODEL Part Two. 前端面试题库 Part One. 前端react方向 阿里巴巴前端暑期实习面经
Uniapp中plus.contacts.getAddressBook获取通讯录为返回type:...
博主: SangSir · 2023-07-12 · via SangSir丨艺术界的一朵奇葩丨至一网络科技

图片1
图片2
在干活的时候同事发现获取不到通讯录,官网也没有写出具体的获取通讯录代码的方法,最后百度搜索到了解决方案,不墨迹直接贴代码:

plus.contacts.getAddressBook(plus.contacts.ADDRESSBOOK_PHONE, function( addressbook ) {
    //  console.log(addressbook)
    addressbook.find(["displayName","phoneNumbers"],res=>{
        console.log(res)
        for(var i in res){
            console.log(res[i]);
        }
    })
}, function(error) {
    console.log(error.message);
});

更多操作,感谢大佬的文章:contacts 模块管理系统通讯录