官方文檔
wx.makePhoneCall(Object object)
撥打電話
參數
Object object
示例代碼
實際應用
對應的wxml
<view class='footer_list2' data-id='4' catchtap='freeTell' data-current="4" bindtap="chooseImg">
<image class="footer-image2" src="../images/tell.png"></image>
</view>
在對應的js文件中定義 freeTell 處理程序
freeTell: function(){
wx.makePhoneCall({
phoneNumber: '03123688777',
})
}
模擬預覽效果:
在手機上看到的效果
微信不會直接發起電話呼叫,而是跳轉到撥號頁面,自動完成號碼輸入