欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

微信小程序實現(xiàn)的一鍵撥號功能示例

 更新時間:2019年04月24日 14:12:42   作者:guanguan0_0  
這篇文章主要介紹了微信小程序實現(xiàn)的一鍵撥號功能,結合實例形式分析了微信小程序使用wx.makePhoneCall實現(xiàn)撥打電話功能相關操作技巧,需要的朋友可以參考下

本文實例講述了微信小程序實現(xiàn)的一鍵撥號功能。分享給大家供大家參考,具體如下:

1. 在.wxml文件中綁定撥號事件

<button type="default" bindtap="calling">撥打電話</button>

2. 在.js文件中加入邏輯代碼

calling: function () {
  wx.makePhoneCall({
    phoneNumber: '***************',
    success: function () {
      console.log("撥打電話成功!")
    },
    fail: function () {
      console.log("撥打電話失敗!")
    }
  })
}

3. 效果圖

關于wx.makePhoneCall更多詳細說明還可參考官網(wǎng)說明:https://developers.weixin.qq.com/miniprogram/dev/api/wx.makePhoneCall.html

希望本文所述對大家微信小程序開發(fā)有所幫助。

相關文章

最新評論