拨号函数:
callPhone(ph) {
// 判断手机是否支持拨打电话功能
if (uni.canIUse('makePhoneCall')) {
uni.makePhoneCall({
phoneNumber: ph, // 电话号码
success: function () {
console.log('拨打电话成功');
},
fail: function () {
console.log('拨打电话失败');
}
});
} else {
console.log('你的设备不支持拨打电话功能');
}
}
上一篇:
js根据经纬度,计算两地之间的距离
下一篇:
tp6发送邮件,函数的处理方式