具体报错
1、项目:app嵌套 uniapp H5页面 2、报错手机平台:安卓 3、使用方法: (1)uni.makePhoneCall() 不兼容 Android,所以可以通过uni.getSystemInfo()进行版本判断操作; (2)App自定义的拨打电话方法,需要用到与app进行交互的“桥”,这个可以问你的app同学或者了解一下"桥";
callPhone() {
uni.getSystemInfo({
success: function (res) {
if (res.platform == 'android') {
window.CZMMJsBridge.callPhone(this.phoneNumber);//app端拨打电话的方法
} else {
uni.makePhoneCall({
phoneNumber: this.phoneNumber, // 电话号码
success: function () {
console.log('拨号成功');
},
fail: function (err) {
window.location.href = 'tel://' + this.phoneNumber;
},
});
}
},
});
},