API:wx.addPhoneContact
安卓微信版本号:8.0.43
基础库:3.4.7
代码片段:
savePhone(){
wx.addPhoneContact({
firstName: this.card.name,
mobilePhoneNumber: this.card.mobile,
success: function () {
wx.showToast({
icon:'success',
title:'保存成功'
})
},
fail: function () {
wx.showModal({
title: '提示',
content: '需要获取用户通讯录权限',
confirmText: '前往设置',
confirmColor: '#3CC51F',
success(res) {
if (res.confirm) {
wx.openSetting();
}
}
});
}
})
},