小程序拨打电话

时间:2020-01-13 12:35:21   收藏:0   阅读:153
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(){},
     })
  },
})
评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!