官網地址:
https://uniapp.dcloud.io/api/system/phone?id=makephonecall
注:手機號格式必須是string類型,不能爲number類型,否則小程序上會調用失敗,h5上不會報錯
uni.makePhoneCall({
phoneNumber:‘40088888888’,//手機號
// 成功回調
success: (res) => {
console.log('調用成功!')
},
// 失敗回調
fail: (res) => {
console.log(res);
}
});