<button class="btn" @click="pop(userPhone)">拨打电话</button>
pop(phone) {
//#ifdef APP-PLUS
plus.device.dial(phone, true);
//#endif
uni.makePhoneCall({
phoneNumber:phone,
success(){
console.log('拨打成功了');
},
fail() {
console.log('拨打失败了');
}
})
}
还需要在APP模块申请通讯录权限