8.6.5 拨打电话

wx.makePhoneCall(OBJECT)

OBJECT参数说明(表8-51): 表8-51

参数 类型 必填 说明
phoneNumber String 需要拨打的电话号码
success Function 接口调用成功的回调
fail Function 接口调用失败的回调函数
complete Function 接口调用结束的回调函数(调用成功、失败都会执行)

示例代码:

wx.makePhoneCall({
  phoneNumber: '1340000' //仅为示例,并非真实的电话号码
})

调用这行代码会弹出“是否拨打电话:1340000”的选择框,点击确定后会拨打电话。

results matching ""

    No results matching ""