//获取手机通讯录
getSystemPhoneAddress: function () {
var that = this;
wx.chooseContact({
success(res) {
var phone = res.phoneNumber;
var name = res.displayName;
that.setData({
inputNum: phone,
contractName: name
})
},
fail(res) {
var posi = res.errMsg.indexOf('cancel');
if (posi > 0) {
myApp.commonutils.showCommonToast("取消获取联系人")
} else {
myApp.commonutils.showCommonToast("获取通讯录联系人失败")
}
}
})
},
你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)