拨打电话API

官网:电话

拨打电话

wx.makePhoneCall(Object object)

phoneNumber 参数值类型需为字符串。

wx.makePhoneCall({
      phoneNumber: '1340000', //仅为示例,并非真实的电话号码
      success() {
        console.log('接口调用成功的回调函数')
      },
      fail() {
        console.log('接口调用失败的回调函数')
      },
      complete() {
        console.log('接口调用结束的回调函数(调用成功、失败都会执行)')
      }
    })

posted @ 2021-05-30 23:26  星河几重  阅读(474)  评论(0编辑  收藏  举报