拨打电话功能
在使用uni-app 开发APP时,有时会用到拨打电话的功能,而安卓端和iOS与小程序端的方法不同特此记录
安卓端
// #ifdef APP-PLUS
plus.device.dial(that.content.mobile, true)
// #endif
需要在manifest.json 的APP权限配置中勾选
微信端 H5 ios
// #ifdef MP-WEIXIN
uni.makePhoneCall({
phoneNumber: that.content.mobile //仅为示例
});
// #endif