小程序拨打电话

index.wxml
<view class="hotLine" bindtap="callPhone" data-phone="{{mobile}}">{{mobile}}</view>


index.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    mobile:'1008611'
  },
  callPhone(e){
     var mobile = e.currentTarget.dataset.phone; 
     var that = this;
     wx.makePhoneCall({
       phoneNumber: mobile,
       success:function(){},
     })
  },
})
原文地址:https://www.cnblogs.com/pycmsj/p/12186479.html