wxml中
<view class="phone">联系电话 : <text>150343188888</text></view>
<view class="tel" bindtap='tels'>拨打</view>
js中
tels:function () {
wx.makePhoneCall({
phoneNumber: '15034318888',此号码并非真实电话号,仅用于测试
success:function(){
console.log('拨打成功')
},
fail:function(){
console.log('拨打失败')
}
})
},
到现在功能已经实现了
开发手册中也有
链接https://developers.weixin.qq.com/miniprogram/dev/api/device/phone/wx.makePhoneCall.html